<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.7"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>cpp-ipfs-http-client: ipfs::Client Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr id="projectrow">
  <td id="projectalign">
   <div id="projectname">cpp-ipfs-http-client
   </div>
   <div id="projectbrief">IPFS C++ client library</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.7 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="namespaceipfs.html">ipfs</a></li><li class="navelem"><a class="el" href="classipfs_1_1Client.html">Client</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-types">Public Types</a> &#124;
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="classipfs_1_1Client-members.html">List of all members</a>  </div>
  <div class="headertitle"><div class="title">ipfs::Client Class Reference</div></div>
</div><!--header-->
<div class="contents">

<p>IPFS client.  
 <a href="classipfs_1_1Client.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="client_8h_source.html">ipfs/client.h</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-types" name="pub-types"></a>
Public Types</h2></td></tr>
<tr class="memitem:adc5716aa4272ff2bedcae954339c77d0"><td class="memItemLeft" align="right" valign="top">enum class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classipfs_1_1Client.html#adc5716aa4272ff2bedcae954339c77d0">PinRmOptions</a> { <a class="el" href="classipfs_1_1Client.html#adc5716aa4272ff2bedcae954339c77d0a254f9369d66a06a09f3ac854e72f6825">NON_RECURSIVE</a>
, <a class="el" href="classipfs_1_1Client.html#adc5716aa4272ff2bedcae954339c77d0a1c1aa83dfe54dfc3528f9e40131cf638">RECURSIVE</a>
 }</td></tr>
<tr class="memdesc:adc5716aa4272ff2bedcae954339c77d0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Options to control the <code><a class="el" href="classipfs_1_1Client.html#a1f5d4bfb19f0f739ce8f888c7cbbcc44" title="Unpin an object.">PinRm()</a></code> method.  <a href="classipfs_1_1Client.html#adc5716aa4272ff2bedcae954339c77d0">More...</a><br /></td></tr>
<tr class="separator:adc5716aa4272ff2bedcae954339c77d0"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-methods" name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a54113a339b48d9d86baeb3ef83b3f01e"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classipfs_1_1Client.html#a54113a339b48d9d86baeb3ef83b3f01e">Client</a> (const std::string &amp;host, long port, const std::string &amp;timeout=&quot;&quot;, const std::string &amp;protocol=&quot;http://&quot;, const std::string &amp;apiPath=&quot;/api/v0&quot;, bool verbose=false)</td></tr>
<tr class="memdesc:a54113a339b48d9d86baeb3ef83b3f01e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructor.  <br /></td></tr>
<tr class="separator:a54113a339b48d9d86baeb3ef83b3f01e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac3d5dd61849bd39acb5641dd169a870d"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classipfs_1_1Client.html#ac3d5dd61849bd39acb5641dd169a870d">Client</a> (const <a class="el" href="classipfs_1_1Client.html">Client</a> &amp;)</td></tr>
<tr class="memdesc:ac3d5dd61849bd39acb5641dd169a870d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Copy-constructor.  <br /></td></tr>
<tr class="separator:ac3d5dd61849bd39acb5641dd169a870d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6c3280837a5620ce4209ac31ceaa84ce"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classipfs_1_1Client.html#a6c3280837a5620ce4209ac31ceaa84ce">Client</a> (<a class="el" href="classipfs_1_1Client.html">Client</a> &amp;&amp;) noexcept</td></tr>
<tr class="memdesc:a6c3280837a5620ce4209ac31ceaa84ce"><td class="mdescLeft">&#160;</td><td class="mdescRight">Move-constructor.  <br /></td></tr>
<tr class="separator:a6c3280837a5620ce4209ac31ceaa84ce"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab3ff2cc70ec6a65761d2d088a9ba9323"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classipfs_1_1Client.html">Client</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classipfs_1_1Client.html#ab3ff2cc70ec6a65761d2d088a9ba9323">operator=</a> (const <a class="el" href="classipfs_1_1Client.html">Client</a> &amp;)</td></tr>
<tr class="memdesc:ab3ff2cc70ec6a65761d2d088a9ba9323"><td class="mdescLeft">&#160;</td><td class="mdescRight">Copy assignment operator.  <br /></td></tr>
<tr class="separator:ab3ff2cc70ec6a65761d2d088a9ba9323"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0fdc4ced9fc352a468dac2ec2ae70dcd"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classipfs_1_1Client.html">Client</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classipfs_1_1Client.html#a0fdc4ced9fc352a468dac2ec2ae70dcd">operator=</a> (<a class="el" href="classipfs_1_1Client.html">Client</a> &amp;&amp;) noexcept</td></tr>
<tr class="memdesc:a0fdc4ced9fc352a468dac2ec2ae70dcd"><td class="mdescLeft">&#160;</td><td class="mdescRight">Move assignment operator.  <br /></td></tr>
<tr class="separator:a0fdc4ced9fc352a468dac2ec2ae70dcd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a640274d537d4da7139c89c4dacac531c"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classipfs_1_1Client.html#a640274d537d4da7139c89c4dacac531c">~Client</a> ()</td></tr>
<tr class="memdesc:a640274d537d4da7139c89c4dacac531c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destructor.  <br /></td></tr>
<tr class="separator:a640274d537d4da7139c89c4dacac531c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae2ab8a0186ec89f1644a3b1d1a0d20fb"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classipfs_1_1Client.html#ae2ab8a0186ec89f1644a3b1d1a0d20fb">Id</a> (<a class="el" href="namespaceipfs.html#a92ea49891c9d47378b920b41704a29ec">Json</a> *id)</td></tr>
<tr class="memdesc:ae2ab8a0186ec89f1644a3b1d1a0d20fb"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return the identity of the peer.  <br /></td></tr>
<tr class="separator:ae2ab8a0186ec89f1644a3b1d1a0d20fb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:adaabe1a027399cbcabe291f3471e87f4"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classipfs_1_1Client.html#adaabe1a027399cbcabe291f3471e87f4">Version</a> (<a class="el" href="namespaceipfs.html#a92ea49891c9d47378b920b41704a29ec">Json</a> *version)</td></tr>
<tr class="memdesc:adaabe1a027399cbcabe291f3471e87f4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return the implementation version of the peer.  <br /></td></tr>
<tr class="separator:adaabe1a027399cbcabe291f3471e87f4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4fc42dccf9392a96d51099bc252a6092"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classipfs_1_1Client.html#a4fc42dccf9392a96d51099bc252a6092">ConfigGet</a> (const std::string &amp;key, <a class="el" href="namespaceipfs.html#a92ea49891c9d47378b920b41704a29ec">Json</a> *config)</td></tr>
<tr class="memdesc:a4fc42dccf9392a96d51099bc252a6092"><td class="mdescLeft">&#160;</td><td class="mdescRight">Query the current config of the peer.  <br /></td></tr>
<tr class="separator:a4fc42dccf9392a96d51099bc252a6092"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab50f9855e7c812542e153475e86645b9"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classipfs_1_1Client.html#ab50f9855e7c812542e153475e86645b9">ConfigSet</a> (const std::string &amp;key, const <a class="el" href="namespaceipfs.html#a92ea49891c9d47378b920b41704a29ec">Json</a> &amp;value)</td></tr>
<tr class="memdesc:ab50f9855e7c812542e153475e86645b9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Add or replace a config knob at the peer.  <br /></td></tr>
<tr class="separator:ab50f9855e7c812542e153475e86645b9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa6e2c0b4a19bacb58932e777be08d232"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classipfs_1_1Client.html#aa6e2c0b4a19bacb58932e777be08d232">ConfigReplace</a> (const <a class="el" href="namespaceipfs.html#a92ea49891c9d47378b920b41704a29ec">Json</a> &amp;config)</td></tr>
<tr class="memdesc:aa6e2c0b4a19bacb58932e777be08d232"><td class="mdescLeft">&#160;</td><td class="mdescRight">Replace the entire config at the peer.  <br /></td></tr>
<tr class="separator:aa6e2c0b4a19bacb58932e777be08d232"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af34ac771242a66294ff60d820712a99d"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classipfs_1_1Client.html#af34ac771242a66294ff60d820712a99d">DhtFindPeer</a> (const std::string &amp;peer_id, <a class="el" href="namespaceipfs.html#a92ea49891c9d47378b920b41704a29ec">Json</a> *addresses)</td></tr>
<tr class="memdesc:af34ac771242a66294ff60d820712a99d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Retrieve the peer info of a reachable node in the network.  <br /></td></tr>
<tr class="separator:af34ac771242a66294ff60d820712a99d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9c93643d0567793925daea95ece432eb"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classipfs_1_1Client.html#a9c93643d0567793925daea95ece432eb">DhtFindProvs</a> (const std::string &amp;hash, <a class="el" href="namespaceipfs.html#a92ea49891c9d47378b920b41704a29ec">Json</a> *providers)</td></tr>
<tr class="memdesc:a9c93643d0567793925daea95ece432eb"><td class="mdescLeft">&#160;</td><td class="mdescRight">Retrieve the providers for a content that is addressed by a hash.  <br /></td></tr>
<tr class="separator:a9c93643d0567793925daea95ece432eb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4cd82e5d6223c2522c50e01047eb9d74"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classipfs_1_1Client.html#a4cd82e5d6223c2522c50e01047eb9d74">BlockGet</a> (const std::string &amp;block_id, std::iostream *block)</td></tr>
<tr class="memdesc:a4cd82e5d6223c2522c50e01047eb9d74"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get a raw IPFS block.  <br /></td></tr>
<tr class="separator:a4cd82e5d6223c2522c50e01047eb9d74"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1613d0ec824f1967a66ff53153d914be"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classipfs_1_1Client.html#a1613d0ec824f1967a66ff53153d914be">BlockPut</a> (const <a class="el" href="structipfs_1_1http_1_1FileUpload.html">http::FileUpload</a> &amp;block, <a class="el" href="namespaceipfs.html#a92ea49891c9d47378b920b41704a29ec">Json</a> *stat)</td></tr>
<tr class="memdesc:a1613d0ec824f1967a66ff53153d914be"><td class="mdescLeft">&#160;</td><td class="mdescRight">Store a raw block in IPFS.  <br /></td></tr>
<tr class="separator:a1613d0ec824f1967a66ff53153d914be"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a08c8f4cc1091fd142e002a2861fada59"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classipfs_1_1Client.html#a08c8f4cc1091fd142e002a2861fada59">BlockStat</a> (const std::string &amp;block_id, <a class="el" href="namespaceipfs.html#a92ea49891c9d47378b920b41704a29ec">Json</a> *stat)</td></tr>
<tr class="memdesc:a08c8f4cc1091fd142e002a2861fada59"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get information for a raw IPFS block.  <br /></td></tr>
<tr class="separator:a08c8f4cc1091fd142e002a2861fada59"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7598eaecec5293f29f84e2fc7ca7bc5b"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classipfs_1_1Client.html#a7598eaecec5293f29f84e2fc7ca7bc5b">FilesGet</a> (const std::string &amp;path, std::iostream *response)</td></tr>
<tr class="memdesc:a7598eaecec5293f29f84e2fc7ca7bc5b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get a file from IPFS.  <br /></td></tr>
<tr class="separator:a7598eaecec5293f29f84e2fc7ca7bc5b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abe2e1d9f5479fa5007f93a0dee053d12"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classipfs_1_1Client.html#abe2e1d9f5479fa5007f93a0dee053d12">FilesAdd</a> (const std::vector&lt; <a class="el" href="structipfs_1_1http_1_1FileUpload.html">http::FileUpload</a> &gt; &amp;files, <a class="el" href="namespaceipfs.html#a92ea49891c9d47378b920b41704a29ec">Json</a> *result)</td></tr>
<tr class="memdesc:abe2e1d9f5479fa5007f93a0dee053d12"><td class="mdescLeft">&#160;</td><td class="mdescRight">Add files to IPFS.  <br /></td></tr>
<tr class="separator:abe2e1d9f5479fa5007f93a0dee053d12"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0c0a73fa1a284cd4a12c1395a0eb356c"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classipfs_1_1Client.html#a0c0a73fa1a284cd4a12c1395a0eb356c">FilesLs</a> (const std::string &amp;path, <a class="el" href="namespaceipfs.html#a92ea49891c9d47378b920b41704a29ec">Json</a> *result)</td></tr>
<tr class="memdesc:a0c0a73fa1a284cd4a12c1395a0eb356c"><td class="mdescLeft">&#160;</td><td class="mdescRight">List directory contents for Unix filesystem objects.  <br /></td></tr>
<tr class="separator:a0c0a73fa1a284cd4a12c1395a0eb356c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ada01369adfda81c869a7095d98197961"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classipfs_1_1Client.html#ada01369adfda81c869a7095d98197961">KeyGen</a> (const std::string &amp;key_name, const std::string &amp;key_type, size_t key_size, std::string *key_id)</td></tr>
<tr class="memdesc:ada01369adfda81c869a7095d98197961"><td class="mdescLeft">&#160;</td><td class="mdescRight">Generate a new key.  <br /></td></tr>
<tr class="separator:ada01369adfda81c869a7095d98197961"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a49d9bb4e44e66170c8e32134300ccfb1"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classipfs_1_1Client.html#a49d9bb4e44e66170c8e32134300ccfb1">KeyList</a> (<a class="el" href="namespaceipfs.html#a92ea49891c9d47378b920b41704a29ec">Json</a> *key_list)</td></tr>
<tr class="memdesc:a49d9bb4e44e66170c8e32134300ccfb1"><td class="mdescLeft">&#160;</td><td class="mdescRight">List all the keys.  <br /></td></tr>
<tr class="separator:a49d9bb4e44e66170c8e32134300ccfb1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8c8c8703f4be0e4eb5053301b3577ed8"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classipfs_1_1Client.html#a8c8c8703f4be0e4eb5053301b3577ed8">KeyRm</a> (const std::string &amp;key_name)</td></tr>
<tr class="memdesc:a8c8c8703f4be0e4eb5053301b3577ed8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Remove a key.  <br /></td></tr>
<tr class="separator:a8c8c8703f4be0e4eb5053301b3577ed8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a599d2585c57dd3abbc1b497454f3c541"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classipfs_1_1Client.html#a599d2585c57dd3abbc1b497454f3c541">KeyRename</a> (const std::string &amp;old_key, const std::string &amp;new_key)</td></tr>
<tr class="memdesc:a599d2585c57dd3abbc1b497454f3c541"><td class="mdescLeft">&#160;</td><td class="mdescRight">Rename an existing key.  <br /></td></tr>
<tr class="separator:a599d2585c57dd3abbc1b497454f3c541"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a93d0ec05a38a4094b3e0dc33c0cc7efe"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classipfs_1_1Client.html#a93d0ec05a38a4094b3e0dc33c0cc7efe">NamePublish</a> (const std::string &amp;object_id, const std::string &amp;key_name, const <a class="el" href="namespaceipfs.html#a92ea49891c9d47378b920b41704a29ec">Json</a> &amp;options, std::string *name_id)</td></tr>
<tr class="memdesc:a93d0ec05a38a4094b3e0dc33c0cc7efe"><td class="mdescLeft">&#160;</td><td class="mdescRight">Publish an IPNS name attached to a given value.  <br /></td></tr>
<tr class="separator:a93d0ec05a38a4094b3e0dc33c0cc7efe"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a61596ec86896753addebc2acac01d011"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classipfs_1_1Client.html#a61596ec86896753addebc2acac01d011">NameResolve</a> (const std::string &amp;name_id, std::string *path_string)</td></tr>
<tr class="memdesc:a61596ec86896753addebc2acac01d011"><td class="mdescLeft">&#160;</td><td class="mdescRight">Resolve an IPNS name.  <br /></td></tr>
<tr class="separator:a61596ec86896753addebc2acac01d011"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a65d8e5b1ac53f2f54bc9860dea015c6d"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classipfs_1_1Client.html#a65d8e5b1ac53f2f54bc9860dea015c6d">ObjectNew</a> (std::string *object_id)</td></tr>
<tr class="memdesc:a65d8e5b1ac53f2f54bc9860dea015c6d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Create a new MerkleDAG node.  <br /></td></tr>
<tr class="separator:a65d8e5b1ac53f2f54bc9860dea015c6d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a783ddccb9559315599b07343b153ffc2"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classipfs_1_1Client.html#a783ddccb9559315599b07343b153ffc2">ObjectPut</a> (const <a class="el" href="namespaceipfs.html#a92ea49891c9d47378b920b41704a29ec">Json</a> &amp;object, <a class="el" href="namespaceipfs.html#a92ea49891c9d47378b920b41704a29ec">Json</a> *object_stored)</td></tr>
<tr class="memdesc:a783ddccb9559315599b07343b153ffc2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Store a MerkleDAG node.  <br /></td></tr>
<tr class="separator:a783ddccb9559315599b07343b153ffc2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abc9556daecb92afeea9b2adfde034a7f"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classipfs_1_1Client.html#abc9556daecb92afeea9b2adfde034a7f">ObjectGet</a> (const std::string &amp;object_id, <a class="el" href="namespaceipfs.html#a92ea49891c9d47378b920b41704a29ec">Json</a> *object)</td></tr>
<tr class="memdesc:abc9556daecb92afeea9b2adfde034a7f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get a MerkleDAG node.  <br /></td></tr>
<tr class="separator:abc9556daecb92afeea9b2adfde034a7f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa8d6e75330c6a3d82130f0be4b66b13e"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classipfs_1_1Client.html#aa8d6e75330c6a3d82130f0be4b66b13e">ObjectData</a> (const std::string &amp;object_id, std::string *data)</td></tr>
<tr class="memdesc:aa8d6e75330c6a3d82130f0be4b66b13e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the data field of a MerkleDAG node.  <br /></td></tr>
<tr class="separator:aa8d6e75330c6a3d82130f0be4b66b13e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a90b1ecd4897794ea6ad5742a41f21525"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classipfs_1_1Client.html#a90b1ecd4897794ea6ad5742a41f21525">ObjectLinks</a> (const std::string &amp;object_id, <a class="el" href="namespaceipfs.html#a92ea49891c9d47378b920b41704a29ec">Json</a> *links)</td></tr>
<tr class="memdesc:a90b1ecd4897794ea6ad5742a41f21525"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get links of a MerkleDAG node.  <br /></td></tr>
<tr class="separator:a90b1ecd4897794ea6ad5742a41f21525"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2fcb017f9de04c221b78e47cf062039d"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classipfs_1_1Client.html#a2fcb017f9de04c221b78e47cf062039d">ObjectStat</a> (const std::string &amp;object_id, <a class="el" href="namespaceipfs.html#a92ea49891c9d47378b920b41704a29ec">Json</a> *stat)</td></tr>
<tr class="memdesc:a2fcb017f9de04c221b78e47cf062039d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get stats about a MerkleDAG node.  <br /></td></tr>
<tr class="separator:a2fcb017f9de04c221b78e47cf062039d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5d239a25cd20cbc15c13c96c790abf46"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classipfs_1_1Client.html#a5d239a25cd20cbc15c13c96c790abf46">ObjectPatchAddLink</a> (const std::string &amp;source, const std::string &amp;link_name, const std::string &amp;link_target, std::string *cloned)</td></tr>
<tr class="memdesc:a5d239a25cd20cbc15c13c96c790abf46"><td class="mdescLeft">&#160;</td><td class="mdescRight">Create a new object from an existing MerkleDAG node and add to its links.  <br /></td></tr>
<tr class="separator:a5d239a25cd20cbc15c13c96c790abf46"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a149b21207f70215ad0097764e6ae2e65"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classipfs_1_1Client.html#a149b21207f70215ad0097764e6ae2e65">ObjectPatchRmLink</a> (const std::string &amp;source, const std::string &amp;link_name, std::string *cloned)</td></tr>
<tr class="memdesc:a149b21207f70215ad0097764e6ae2e65"><td class="mdescLeft">&#160;</td><td class="mdescRight">Create a new object from an existing MerkleDAG node and remove one of its links.  <br /></td></tr>
<tr class="separator:a149b21207f70215ad0097764e6ae2e65"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af414390a18a656fd2568cf70481e51b4"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classipfs_1_1Client.html#af414390a18a656fd2568cf70481e51b4">ObjectPatchAppendData</a> (const std::string &amp;source, const <a class="el" href="structipfs_1_1http_1_1FileUpload.html">http::FileUpload</a> &amp;data, std::string *cloned)</td></tr>
<tr class="memdesc:af414390a18a656fd2568cf70481e51b4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Create a new object from an existing MerkleDAG node and append data to it.  <br /></td></tr>
<tr class="separator:af414390a18a656fd2568cf70481e51b4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a949a35293f16868980ab013606264b24"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classipfs_1_1Client.html#a949a35293f16868980ab013606264b24">ObjectPatchSetData</a> (const std::string &amp;source, const <a class="el" href="structipfs_1_1http_1_1FileUpload.html">http::FileUpload</a> &amp;data, std::string *cloned)</td></tr>
<tr class="memdesc:a949a35293f16868980ab013606264b24"><td class="mdescLeft">&#160;</td><td class="mdescRight">Create a new object from an existing MerkleDAG node and set its data.  <br /></td></tr>
<tr class="separator:a949a35293f16868980ab013606264b24"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a18e6d6a299748d3ba3a681bac7c5bd5d"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classipfs_1_1Client.html#a18e6d6a299748d3ba3a681bac7c5bd5d">PinAdd</a> (const std::string &amp;object_id)</td></tr>
<tr class="memdesc:a18e6d6a299748d3ba3a681bac7c5bd5d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Pin a given IPFS object.  <br /></td></tr>
<tr class="separator:a18e6d6a299748d3ba3a681bac7c5bd5d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5c6f313e1d361f4d21a7a67915e6b19f"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classipfs_1_1Client.html#a5c6f313e1d361f4d21a7a67915e6b19f">PinLs</a> (<a class="el" href="namespaceipfs.html#a92ea49891c9d47378b920b41704a29ec">Json</a> *pinned)</td></tr>
<tr class="memdesc:a5c6f313e1d361f4d21a7a67915e6b19f"><td class="mdescLeft">&#160;</td><td class="mdescRight">List all the objects pinned to local storage.  <br /></td></tr>
<tr class="separator:a5c6f313e1d361f4d21a7a67915e6b19f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1d775b25a4d80ba95c040694e9c9d877"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classipfs_1_1Client.html#a1d775b25a4d80ba95c040694e9c9d877">PinLs</a> (const std::string &amp;object_id, <a class="el" href="namespaceipfs.html#a92ea49891c9d47378b920b41704a29ec">Json</a> *pinned)</td></tr>
<tr class="memdesc:a1d775b25a4d80ba95c040694e9c9d877"><td class="mdescLeft">&#160;</td><td class="mdescRight">List the objects pinned under a specific hash.  <br /></td></tr>
<tr class="separator:a1d775b25a4d80ba95c040694e9c9d877"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1f5d4bfb19f0f739ce8f888c7cbbcc44"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classipfs_1_1Client.html#a1f5d4bfb19f0f739ce8f888c7cbbcc44">PinRm</a> (const std::string &amp;object_id, <a class="el" href="classipfs_1_1Client.html#adc5716aa4272ff2bedcae954339c77d0">PinRmOptions</a> options)</td></tr>
<tr class="memdesc:a1f5d4bfb19f0f739ce8f888c7cbbcc44"><td class="mdescLeft">&#160;</td><td class="mdescRight">Unpin an object.  <br /></td></tr>
<tr class="separator:a1f5d4bfb19f0f739ce8f888c7cbbcc44"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad944a5a304c799b314b3b9ab7765d314"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classipfs_1_1Client.html#ad944a5a304c799b314b3b9ab7765d314">StatsBw</a> (<a class="el" href="namespaceipfs.html#a92ea49891c9d47378b920b41704a29ec">Json</a> *bandwidth_info)</td></tr>
<tr class="memdesc:ad944a5a304c799b314b3b9ab7765d314"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get IPFS bandwidth (bw) information.  <br /></td></tr>
<tr class="separator:ad944a5a304c799b314b3b9ab7765d314"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aec756626c42caf55728dad5b6cb7d0f3"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classipfs_1_1Client.html#aec756626c42caf55728dad5b6cb7d0f3">StatsRepo</a> (<a class="el" href="namespaceipfs.html#a92ea49891c9d47378b920b41704a29ec">Json</a> *repo_stats)</td></tr>
<tr class="memdesc:aec756626c42caf55728dad5b6cb7d0f3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get IPFS Repo Stats.  <br /></td></tr>
<tr class="separator:aec756626c42caf55728dad5b6cb7d0f3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa45a95118ec539863c12da953ab1988c"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classipfs_1_1Client.html#aa45a95118ec539863c12da953ab1988c">SwarmAddrs</a> (<a class="el" href="namespaceipfs.html#a92ea49891c9d47378b920b41704a29ec">Json</a> *addresses)</td></tr>
<tr class="memdesc:aa45a95118ec539863c12da953ab1988c"><td class="mdescLeft">&#160;</td><td class="mdescRight">List of known addresses of each peer connected.  <br /></td></tr>
<tr class="separator:aa45a95118ec539863c12da953ab1988c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2dc1372e2c7505e541115c97c7b497a7"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classipfs_1_1Client.html#a2dc1372e2c7505e541115c97c7b497a7">SwarmConnect</a> (const std::string &amp;peer)</td></tr>
<tr class="memdesc:a2dc1372e2c7505e541115c97c7b497a7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Open a connection to a given address.  <br /></td></tr>
<tr class="separator:a2dc1372e2c7505e541115c97c7b497a7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afd550da40c4517c59750327784707923"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classipfs_1_1Client.html#afd550da40c4517c59750327784707923">SwarmDisconnect</a> (const std::string &amp;peer)</td></tr>
<tr class="memdesc:afd550da40c4517c59750327784707923"><td class="mdescLeft">&#160;</td><td class="mdescRight">Close a connection on a given address.  <br /></td></tr>
<tr class="separator:afd550da40c4517c59750327784707923"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3c1f5392892d51152e45221ce1a026da"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classipfs_1_1Client.html#a3c1f5392892d51152e45221ce1a026da">SwarmPeers</a> (<a class="el" href="namespaceipfs.html#a92ea49891c9d47378b920b41704a29ec">Json</a> *peers)</td></tr>
<tr class="memdesc:a3c1f5392892d51152e45221ce1a026da"><td class="mdescLeft">&#160;</td><td class="mdescRight">List the peers that we have connections with.  <br /></td></tr>
<tr class="separator:a3c1f5392892d51152e45221ce1a026da"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aaa862322e6ec703b91ed356d968fbc49"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classipfs_1_1Client.html#aaa862322e6ec703b91ed356d968fbc49">Abort</a> ()</td></tr>
<tr class="memdesc:aaa862322e6ec703b91ed356d968fbc49"><td class="mdescLeft">&#160;</td><td class="mdescRight">Abort any current running IPFS API request.  <br /></td></tr>
<tr class="separator:aaa862322e6ec703b91ed356d968fbc49"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a60b2274e7ee70ed9392870cd2c5a8559"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classipfs_1_1Client.html#a60b2274e7ee70ed9392870cd2c5a8559">Reset</a> ()</td></tr>
<tr class="memdesc:a60b2274e7ee70ed9392870cd2c5a8559"><td class="mdescLeft">&#160;</td><td class="mdescRight">Resets the abort call, allowing to execute new API requests again.  <br /></td></tr>
<tr class="separator:a60b2274e7ee70ed9392870cd2c5a8559"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>IPFS client. </p>
<p>It implements the interface described in <a href="https://github.com/ipfs/js-ipfs/tree/master/docs/core-api">https://github.com/ipfs/js-ipfs/tree/master/docs/core-api</a>.</p>
<p>The methods of this class may throw some variant of <code>std::exception</code> if a connectivity error occurs or if the response cannot be parsed. Be prepared!</p>
<dl class="section since"><dt>Since</dt><dd>version 0.1.0 </dd></dl>
<dl class="section examples"><dt>Examples</dt><dd><a class="el" href="threading_example_8cc-example.html#_a0">threading_example.cc</a>.</dd>
</dl>
</div><h2 class="groupheader">Member Enumeration Documentation</h2>
<a id="adc5716aa4272ff2bedcae954339c77d0" name="adc5716aa4272ff2bedcae954339c77d0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#adc5716aa4272ff2bedcae954339c77d0">&#9670;&#160;</a></span>PinRmOptions</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">enum class <a class="el" href="classipfs_1_1Client.html#adc5716aa4272ff2bedcae954339c77d0">ipfs::Client::PinRmOptions</a></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">strong</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Options to control the <code><a class="el" href="classipfs_1_1Client.html#a1f5d4bfb19f0f739ce8f888c7cbbcc44" title="Unpin an object.">PinRm()</a></code> method. </p>
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a id="adc5716aa4272ff2bedcae954339c77d0a254f9369d66a06a09f3ac854e72f6825" name="adc5716aa4272ff2bedcae954339c77d0a254f9369d66a06a09f3ac854e72f6825"></a>NON_RECURSIVE&#160;</td><td class="fielddoc"><p>Just unpin the specified object. </p>
</td></tr>
<tr><td class="fieldname"><a id="adc5716aa4272ff2bedcae954339c77d0a1c1aa83dfe54dfc3528f9e40131cf638" name="adc5716aa4272ff2bedcae954339c77d0a1c1aa83dfe54dfc3528f9e40131cf638"></a>RECURSIVE&#160;</td><td class="fielddoc"><p>Recursively unpin the objects. </p>
</td></tr>
</table>

</div>
</div>
<h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a id="a54113a339b48d9d86baeb3ef83b3f01e" name="a54113a339b48d9d86baeb3ef83b3f01e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a54113a339b48d9d86baeb3ef83b3f01e">&#9670;&#160;</a></span>Client() <span class="overload">[1/3]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ipfs::Client::Client </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>host</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">long&#160;</td>
          <td class="paramname"><em>port</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>timeout</em> = <code>&quot;&quot;</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>protocol</em> = <code>&quot;http://&quot;</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>apiPath</em> = <code>&quot;/api/v0&quot;</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>verbose</em> = <code>false</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Constructor. </p>
<p>An example usage: </p><div class="fragment"><div class="line">    <a class="code hl_class" href="classipfs_1_1Client.html">ipfs::Client</a> client(<span class="stringliteral">&quot;localhost&quot;</span>, 5001);</div>
<div class="line"> </div>
<div class="line">    <span class="comment">// Client constructor with additional parameters</span></div>
<div class="line">    <a class="code hl_class" href="classipfs_1_1Client.html">ipfs::Client</a> client2(<span class="stringliteral">&quot;localhost&quot;</span>, 5001, <span class="stringliteral">&quot;6s&quot;</span>, <span class="stringliteral">&quot;http://&quot;</span>, <span class="stringliteral">&quot;/api/v0&quot;</span>);</div>
<div class="line">   </div>
<div class="line">    <span class="comment">// Client constructor with cURL debug mode enabled</span></div>
<div class="line">    <a class="code hl_class" href="classipfs_1_1Client.html">ipfs::Client</a> client3(<span class="stringliteral">&quot;localhost&quot;</span>, 5001, <span class="stringliteral">&quot;6s&quot;</span>, <span class="stringliteral">&quot;http://&quot;</span>, <span class="stringliteral">&quot;/api/v0&quot;</span>, <span class="keyword">true</span>);</div>
<div class="ttc" id="aclassipfs_1_1Client_html"><div class="ttname"><a href="classipfs_1_1Client.html">ipfs::Client</a></div><div class="ttdoc">IPFS client.</div><div class="ttdef"><b>Definition</b> client.h:48</div></div>
</div><!-- fragment --><dl class="section since"><dt>Since</dt><dd>version 0.1.0 </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">host</td><td>Hostname or IP address of the server to connect to.  </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">port</td><td>Port to connect to.  </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">timeout</td><td>[Optional] set server-side time-out, which should be string (eg. "6s")  </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">protocol</td><td>[Optional] protocol (default: <a href="http://">http://</a>)  </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">apiPath</td><td>[Optional] API Path (default: /api/v0)  </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">verbose</td><td>[Optional] Enable cURL Verbose Mode (default: false) </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ac3d5dd61849bd39acb5641dd169a870d" name="ac3d5dd61849bd39acb5641dd169a870d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac3d5dd61849bd39acb5641dd169a870d">&#9670;&#160;</a></span>Client() <span class="overload">[2/3]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ipfs::Client::Client </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classipfs_1_1Client.html">Client</a> &amp;&#160;</td>
          <td class="paramname"><em>other</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Copy-constructor. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">other</td><td>Other client connection to be copied. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a6c3280837a5620ce4209ac31ceaa84ce" name="a6c3280837a5620ce4209ac31ceaa84ce"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6c3280837a5620ce4209ac31ceaa84ce">&#9670;&#160;</a></span>Client() <span class="overload">[3/3]</span></h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">ipfs::Client::Client </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classipfs_1_1Client.html">Client</a> &amp;&amp;&#160;</td>
          <td class="paramname"><em>other</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">noexcept</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Move-constructor. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in,out]</td><td class="paramname">other</td><td>Other client connection to be moved. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a640274d537d4da7139c89c4dacac531c" name="a640274d537d4da7139c89c4dacac531c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a640274d537d4da7139c89c4dacac531c">&#9670;&#160;</a></span>~Client()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">ipfs::Client::~Client </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">default</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Destructor. </p>
<dl class="section since"><dt>Since</dt><dd>version 0.1.0 </dd></dl>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="aaa862322e6ec703b91ed356d968fbc49" name="aaa862322e6ec703b91ed356d968fbc49"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aaa862322e6ec703b91ed356d968fbc49">&#9670;&#160;</a></span>Abort()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ipfs::Client::Abort </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Abort any current running IPFS API request. </p>
<p>Very useful if you were using the IPFS client API calls inside seperate thread, but which to abort the request and stop the running thread (without using pthread_cancel).</p>
<p>Call this method out-side of the running thread, eg. the main thread.</p>
<p>See example: <a href="https://vasild.github.io/cpp-ipfs-http-client/examples.html">https://vasild.github.io/cpp-ipfs-http-client/examples.html</a></p>
<div class="fragment"><div class="line">      client.Abort();</div>
<div class="line">      thread.join();</div>
<div class="line">      client.Reset();</div>
</div><!-- fragment --><dl class="section since"><dt>Since</dt><dd>version 0.6.0 </dd></dl>
<dl class="section examples"><dt>Examples</dt><dd><a class="el" href="threading_example_8cc-example.html#a2">threading_example.cc</a>.</dd>
</dl>

</div>
</div>
<a id="a4cd82e5d6223c2522c50e01047eb9d74" name="a4cd82e5d6223c2522c50e01047eb9d74"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4cd82e5d6223c2522c50e01047eb9d74">&#9670;&#160;</a></span>BlockGet()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ipfs::Client::BlockGet </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>block_id</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::iostream *&#160;</td>
          <td class="paramname"><em>block</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get a raw IPFS block. </p>
<p>Implements <a href="https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md#blockget">https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md#blockget</a>.</p>
<p>An example usage: </p><div class="fragment"><div class="line">    std::stringstream block_contents;</div>
<div class="line">    <span class="comment">/* E.g. block[&quot;Key&quot;] is &quot;QmQpWo5TL9nivqvL18Bq8bS34eewAA6jcgdVsUu4tGeVHo&quot;. */</span></div>
<div class="line">    client.BlockGet(block[<span class="stringliteral">&quot;Key&quot;</span>], &amp;block_contents);</div>
<div class="line">    std::cout &lt;&lt; <span class="stringliteral">&quot;Block (hex): &quot;</span></div>
<div class="line">              &lt;&lt; ipfs::test::string_to_hex(block_contents.str()) &lt;&lt; std::endl;</div>
<div class="line">    <span class="comment">/* An example output:</span></div>
<div class="line"><span class="comment">    Block (hex): 426c6f636b2070757420746573742e</span></div>
<div class="line"><span class="comment">    */</span></div>
</div><!-- fragment --><dl class="exception"><dt>Exceptions</dt><dd>
  <table class="exception">
    <tr><td class="paramname">std::exception</td><td>if any error occurs</td></tr>
  </table>
  </dd>
</dl>
<dl class="section since"><dt>Since</dt><dd>version 0.1.0 </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">block_id</td><td>Id of the block (multihash).  </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">block</td><td>Raw contents of the block is written to this stream as it is retrieved. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a1613d0ec824f1967a66ff53153d914be" name="a1613d0ec824f1967a66ff53153d914be"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1613d0ec824f1967a66ff53153d914be">&#9670;&#160;</a></span>BlockPut()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ipfs::Client::BlockPut </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="structipfs_1_1http_1_1FileUpload.html">http::FileUpload</a> &amp;&#160;</td>
          <td class="paramname"><em>block</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="namespaceipfs.html#a92ea49891c9d47378b920b41704a29ec">Json</a> *&#160;</td>
          <td class="paramname"><em>stat</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Store a raw block in IPFS. </p>
<p>Implements <a href="https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md#blockput">https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md#blockput</a>.</p>
<p>An example usage: </p><div class="fragment"><div class="line">    <a class="code hl_typedef" href="namespaceipfs.html#a92ea49891c9d47378b920b41704a29ec">ipfs::Json</a> block;</div>
<div class="line">    client.BlockPut(</div>
<div class="line">        {<span class="stringliteral">&quot;&quot;</span> <span class="comment">/* no file name */</span>, <a class="code hl_enumvalue" href="structipfs_1_1http_1_1FileUpload.html#a76d8546add495d01fd1dcd82ea8170adafc941c889c1d94c918bfd225c22aed65">ipfs::http::FileUpload::Type::kFileContents</a>,</div>
<div class="line">         <span class="stringliteral">&quot;Block put test.&quot;</span>},</div>
<div class="line">        &amp;block);</div>
<div class="line">    std::cout &lt;&lt; <span class="stringliteral">&quot;Stored block key: &quot;</span> &lt;&lt; block[<span class="stringliteral">&quot;Key&quot;</span>] &lt;&lt; std::endl;</div>
<div class="line">    <span class="comment">/* An example output:</span></div>
<div class="line"><span class="comment">    Stored block key: &quot;QmQpWo5TL9nivqvL18Bq8bS34eewAA6jcgdVsUu4tGeVHo&quot;</span></div>
<div class="line"><span class="comment">    */</span></div>
<div class="ttc" id="anamespaceipfs_html_a92ea49891c9d47378b920b41704a29ec"><div class="ttname"><a href="namespaceipfs.html#a92ea49891c9d47378b920b41704a29ec">ipfs::Json</a></div><div class="ttdeci">nlohmann::json Json</div><div class="ttdoc">Type of the output of some methods, aliased for convenience.</div><div class="ttdef"><b>Definition</b> client.h:37</div></div>
<div class="ttc" id="astructipfs_1_1http_1_1FileUpload_html_a76d8546add495d01fd1dcd82ea8170adafc941c889c1d94c918bfd225c22aed65"><div class="ttname"><a href="structipfs_1_1http_1_1FileUpload.html#a76d8546add495d01fd1dcd82ea8170adafc941c889c1d94c918bfd225c22aed65">ipfs::http::FileUpload::Type::kFileContents</a></div><div class="ttdeci">@ kFileContents</div><div class="ttdoc">The file contents, put into a string by the caller.</div></div>
</div><!-- fragment --><dl class="exception"><dt>Exceptions</dt><dd>
  <table class="exception">
    <tr><td class="paramname">std::exception</td><td>if any error occurs</td></tr>
  </table>
  </dd>
</dl>
<dl class="section since"><dt>Since</dt><dd>version 0.1.0 </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">block</td><td>Raw contents of the block to store.  </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">stat</td><td>Information about the stored block. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a08c8f4cc1091fd142e002a2861fada59" name="a08c8f4cc1091fd142e002a2861fada59"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a08c8f4cc1091fd142e002a2861fada59">&#9670;&#160;</a></span>BlockStat()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ipfs::Client::BlockStat </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>block_id</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="namespaceipfs.html#a92ea49891c9d47378b920b41704a29ec">Json</a> *&#160;</td>
          <td class="paramname"><em>stat</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get information for a raw IPFS block. </p>
<p>Implements <a href="https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md#blockstat">https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/BLOCK.md#blockstat</a>.</p>
<p>An example usage: </p><div class="fragment"><div class="line">    <a class="code hl_typedef" href="namespaceipfs.html#a92ea49891c9d47378b920b41704a29ec">ipfs::Json</a> stat_result;</div>
<div class="line">    client.BlockStat(block[<span class="stringliteral">&quot;Key&quot;</span>], &amp;stat_result);</div>
<div class="line">    std::cout &lt;&lt; <span class="stringliteral">&quot;Stat: &quot;</span> &lt;&lt; stat_result &lt;&lt; std::endl;</div>
<div class="line">    <span class="comment">/* An example output:</span></div>
<div class="line"><span class="comment">    Stat: {&quot;Key&quot;:&quot;QmQpWo5TL9nivqvL18Bq8bS34eewAA6jcgdVsUu4tGeVHo&quot;,&quot;Size&quot;:15}</span></div>
<div class="line"><span class="comment">    */</span></div>
</div><!-- fragment --><dl class="exception"><dt>Exceptions</dt><dd>
  <table class="exception">
    <tr><td class="paramname">std::exception</td><td>if any error occurs</td></tr>
  </table>
  </dd>
</dl>
<dl class="section since"><dt>Since</dt><dd>version 0.1.0 </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">block_id</td><td>Id of the block (multihash).  </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">stat</td><td>Retrieved information about the block. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a4fc42dccf9392a96d51099bc252a6092" name="a4fc42dccf9392a96d51099bc252a6092"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4fc42dccf9392a96d51099bc252a6092">&#9670;&#160;</a></span>ConfigGet()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ipfs::Client::ConfigGet </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>key</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="namespaceipfs.html#a92ea49891c9d47378b920b41704a29ec">Json</a> *&#160;</td>
          <td class="paramname"><em>config</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Query the current config of the peer. </p>
<p>Implements <a href="https://github.com/ipfs/js-ipfs/tree/master/docs/core-api/CONFIG.md#configget">https://github.com/ipfs/js-ipfs/tree/master/docs/core-api/CONFIG.md#configget</a>.</p>
<p>An example usage: </p><div class="fragment"><div class="line">    <a class="code hl_typedef" href="namespaceipfs.html#a92ea49891c9d47378b920b41704a29ec">ipfs::Json</a> config;</div>
<div class="line">    client.ConfigGet(<span class="stringliteral">&quot;Datastore&quot;</span>, &amp;config);</div>
<div class="line">    std::cout &lt;&lt; R<span class="stringliteral">&quot;(Config &quot;Datastore&quot;:)&quot; &lt;&lt; std::endl</span></div>
<div class="line"><span class="stringliteral">              &lt;&lt; config.dump(2) &lt;&lt; std::endl;</span></div>
<div class="line"><span class="stringliteral">    </span><span class="comment">/* An example output:</span></div>
<div class="line"><span class="comment">    Config &quot;Datastore&quot;:</span></div>
<div class="line"><span class="comment">    {</span></div>
<div class="line"><span class="comment">      &quot;BloomFilterSize&quot;: 0,</span></div>
<div class="line"><span class="comment">      &quot;GCPeriod&quot;: &quot;1h&quot;,</span></div>
<div class="line"><span class="comment">      &quot;HashOnRead&quot;: false,</span></div>
<div class="line"><span class="comment">      &quot;NoSync&quot;: false,</span></div>
<div class="line"><span class="comment">      &quot;Params&quot;: null,</span></div>
<div class="line"><span class="comment">      &quot;Path&quot;: &quot;/home/vd/.ipfs/datastore&quot;,</span></div>
<div class="line"><span class="comment">      &quot;StorageGCWatermark&quot;: 90,</span></div>
<div class="line"><span class="comment">      &quot;StorageMax&quot;: &quot;10GB&quot;,</span></div>
<div class="line"><span class="comment">      &quot;Type&quot;: &quot;leveldb&quot;</span></div>
<div class="line"><span class="comment">    }</span></div>
<div class="line"><span class="comment">    */</span></div>
<div class="line"> </div>
<div class="line">    client.ConfigGet(<span class="stringliteral">&quot;&quot;</span> <span class="comment">/* fetch the entire config */</span>, &amp;config);</div>
<div class="line">    std::cout &lt;&lt; <span class="stringliteral">&quot;Config max storage: &quot;</span> &lt;&lt; config[<span class="stringliteral">&quot;Datastore&quot;</span>][<span class="stringliteral">&quot;StorageMax&quot;</span>]</div>
<div class="line">              &lt;&lt; std::endl;</div>
<div class="line">    <span class="comment">/* An example output:</span></div>
<div class="line"><span class="comment">    Config max storage: &quot;10GB&quot;</span></div>
<div class="line"><span class="comment">    */</span></div>
</div><!-- fragment --><dl class="exception"><dt>Exceptions</dt><dd>
  <table class="exception">
    <tr><td class="paramname">std::exception</td><td>if any error occurs</td></tr>
  </table>
  </dd>
</dl>
<dl class="section since"><dt>Since</dt><dd>version 0.1.0 </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">key</td><td>The key of the value to fetch from the config. If this is an empty string, then the whole config is fetched.  </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">config</td><td>Fetched config. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="aa6e2c0b4a19bacb58932e777be08d232" name="aa6e2c0b4a19bacb58932e777be08d232"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa6e2c0b4a19bacb58932e777be08d232">&#9670;&#160;</a></span>ConfigReplace()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ipfs::Client::ConfigReplace </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="namespaceipfs.html#a92ea49891c9d47378b920b41704a29ec">Json</a> &amp;&#160;</td>
          <td class="paramname"><em>config</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Replace the entire config at the peer. </p>
<p>Implements <a href="https://github.com/ipfs/js-ipfs/tree/master/docs/core-api/CONFIG.md#configreplace">https://github.com/ipfs/js-ipfs/tree/master/docs/core-api/CONFIG.md#configreplace</a>.</p>
<p>An example usage: </p><div class="fragment"><div class="line">    <a class="code hl_typedef" href="namespaceipfs.html#a92ea49891c9d47378b920b41704a29ec">ipfs::Json</a> entire_config;</div>
<div class="line">    client.ConfigGet(<span class="stringliteral">&quot;&quot;</span> <span class="comment">/* fetch the entire config */</span>, &amp;entire_config);</div>
<div class="line"> </div>
<div class="line">    client.ConfigReplace(entire_config);</div>
</div><!-- fragment --><dl class="exception"><dt>Exceptions</dt><dd>
  <table class="exception">
    <tr><td class="paramname">std::exception</td><td>if any error occurs</td></tr>
  </table>
  </dd>
</dl>
<dl class="section since"><dt>Since</dt><dd>version 0.1.0 </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">config</td><td>The entire config to set/replace. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ab50f9855e7c812542e153475e86645b9" name="ab50f9855e7c812542e153475e86645b9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab50f9855e7c812542e153475e86645b9">&#9670;&#160;</a></span>ConfigSet()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ipfs::Client::ConfigSet </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>key</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="namespaceipfs.html#a92ea49891c9d47378b920b41704a29ec">Json</a> &amp;&#160;</td>
          <td class="paramname"><em>value</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Add or replace a config knob at the peer. </p>
<p>Implements <a href="https://github.com/ipfs/js-ipfs/tree/master/docs/core-api/CONFIG.md#configset">https://github.com/ipfs/js-ipfs/tree/master/docs/core-api/CONFIG.md#configset</a>.</p>
<p>An example usage: </p><div class="fragment"><div class="line">    client.ConfigSet(<span class="stringliteral">&quot;Datastore.StorageMax&quot;</span>, <span class="stringliteral">&quot;20GB&quot;</span>);</div>
<div class="line"> </div>
<div class="line">    client.ConfigSet(<span class="stringliteral">&quot;Datastore.StorageGCWatermark&quot;</span>, 80);</div>
<div class="line"> </div>
<div class="line">    client.ConfigSet(<span class="stringliteral">&quot;Mounts&quot;</span>,</div>
<div class="line">                     R<span class="stringliteral">&quot;({</span></div>
<div class="line"><span class="stringliteral">                          &quot;FuseAllowOther&quot;: false,</span></div>
<div class="line"><span class="stringliteral">                          &quot;IPFS&quot;: &quot;/ipfs&quot;,</span></div>
<div class="line"><span class="stringliteral">                          &quot;IPNS&quot;: &quot;/ipns&quot;</span></div>
<div class="line"><span class="stringliteral">                        })&quot;_json);</span></div>
</div><!-- fragment --><dl class="exception"><dt>Exceptions</dt><dd>
  <table class="exception">
    <tr><td class="paramname">std::exception</td><td>if any error occurs</td></tr>
  </table>
  </dd>
</dl>
<dl class="section since"><dt>Since</dt><dd>version 0.1.0 </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">key</td><td>The key of the config knob to set.  </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">value</td><td>The value to set for the key. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="af34ac771242a66294ff60d820712a99d" name="af34ac771242a66294ff60d820712a99d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af34ac771242a66294ff60d820712a99d">&#9670;&#160;</a></span>DhtFindPeer()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ipfs::Client::DhtFindPeer </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>peer_id</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="namespaceipfs.html#a92ea49891c9d47378b920b41704a29ec">Json</a> *&#160;</td>
          <td class="paramname"><em>addresses</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Retrieve the peer info of a reachable node in the network. </p>
<p>Implements <a href="https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DHT.md#dhtfindpeer">https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DHT.md#dhtfindpeer</a>.</p>
<p>An example usage: </p><div class="fragment"><div class="line">    <span class="comment">/* std::string peer_id = &quot;QmcZrBqWBYV3RGsPuhQX11Qzp...maDYF&quot; for example. */</span></div>
<div class="line">    <a class="code hl_typedef" href="namespaceipfs.html#a92ea49891c9d47378b920b41704a29ec">ipfs::Json</a> peer_addresses;</div>
<div class="line"> </div>
<div class="line">    client.DhtFindPeer(peer_id, &amp;peer_addresses);</div>
<div class="line"> </div>
<div class="line">    std::cout &lt;&lt; <span class="stringliteral">&quot;Peer &quot;</span> &lt;&lt; peer_id &lt;&lt; <span class="stringliteral">&quot; info:&quot;</span> &lt;&lt; std::endl</div>
<div class="line">              &lt;&lt; peer_addresses.dump(2) &lt;&lt; std::endl;</div>
<div class="line">    <span class="comment">/* An example output:</span></div>
<div class="line"><span class="comment">    Peer QmcZrBqWBYV3RGsPuhQX11QzpKAQ8SYfMYL1dGXuPmaDYF info:</span></div>
<div class="line"><span class="comment">    [</span></div>
<div class="line"><span class="comment">      &quot;/ip6/::1/tcp/4001&quot;,</span></div>
<div class="line"><span class="comment">      &quot;/ip4/212.227.249.191/tcp/4001&quot;,</span></div>
<div class="line"><span class="comment">      &quot;/ip4/127.0.0.1/tcp/4001&quot;</span></div>
<div class="line"><span class="comment">    ]</span></div>
<div class="line"><span class="comment">    */</span></div>
</div><!-- fragment --><dl class="exception"><dt>Exceptions</dt><dd>
  <table class="exception">
    <tr><td class="paramname">std::exception</td><td>if any error occurs</td></tr>
  </table>
  </dd>
</dl>
<dl class="section since"><dt>Since</dt><dd>version 0.1.0 </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">peer_id</td><td>Id of the peer (multihash).  </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">addresses</td><td>List of the peer's addresses. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a9c93643d0567793925daea95ece432eb" name="a9c93643d0567793925daea95ece432eb"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9c93643d0567793925daea95ece432eb">&#9670;&#160;</a></span>DhtFindProvs()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ipfs::Client::DhtFindProvs </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>hash</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="namespaceipfs.html#a92ea49891c9d47378b920b41704a29ec">Json</a> *&#160;</td>
          <td class="paramname"><em>providers</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Retrieve the providers for a content that is addressed by a hash. </p>
<p>Implements <a href="https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DHT.md#dhtfindprovs">https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DHT.md#dhtfindprovs</a>.</p>
<p>An example usage: </p><div class="fragment"><div class="line">    <span class="comment">/* std::string hash = &quot;QmWPyMW2u7J2Zyzut7TcBMT8pG6F...Bt1nP&quot; for example. */</span></div>
<div class="line">    <a class="code hl_typedef" href="namespaceipfs.html#a92ea49891c9d47378b920b41704a29ec">ipfs::Json</a> providers;</div>
<div class="line"> </div>
<div class="line">    client.DhtFindProvs(hash, &amp;providers);</div>
<div class="line"> </div>
<div class="line">    std::cout &lt;&lt; <span class="stringliteral">&quot;Providers for &quot;</span> &lt;&lt; hash &lt;&lt; <span class="stringliteral">&quot;:&quot;</span> &lt;&lt; std::endl</div>
<div class="line">              &lt;&lt; providers.dump(2).substr(0, 512) &lt;&lt; <span class="stringliteral">&quot;...&quot;</span> &lt;&lt; std::endl;</div>
<div class="line">    <span class="comment">/* An example output:</span></div>
<div class="line"><span class="comment">    [</span></div>
<div class="line"><span class="comment">      {</span></div>
<div class="line"><span class="comment">        &quot;Extra&quot;: &quot;&quot;,</span></div>
<div class="line"><span class="comment">        &quot;ID&quot;: &quot;&quot;,</span></div>
<div class="line"><span class="comment">        &quot;Responses&quot;: [</span></div>
<div class="line"><span class="comment">          {</span></div>
<div class="line"><span class="comment">            &quot;Addrs&quot;: null,</span></div>
<div class="line"><span class="comment">            &quot;ID&quot;: &quot;QmZSb7SYajaEEbJU2FB4XJWWfxX9AjwmdreK5MDu9zuQvn&quot;</span></div>
<div class="line"><span class="comment">          }</span></div>
<div class="line"><span class="comment">        ],</span></div>
<div class="line"><span class="comment">        &quot;Type&quot;: 4</span></div>
<div class="line"><span class="comment">      },</span></div>
<div class="line"><span class="comment">      {</span></div>
<div class="line"><span class="comment">        &quot;Extra&quot;: &quot;&quot;,</span></div>
<div class="line"><span class="comment">        &quot;ID&quot;: &quot;QmYoQjsZeSyzeeX9yCu5jfETgKinR2Udeej385FzPprsGg&quot;,</span></div>
<div class="line"><span class="comment">        &quot;Responses&quot;: null,</span></div>
<div class="line"><span class="comment">        &quot;Type&quot;: 6</span></div>
<div class="line"><span class="comment">      },</span></div>
<div class="line"><span class="comment">      {</span></div>
<div class="line"><span class="comment">        &quot;Extra&quot;: &quot;&quot;,</span></div>
<div class="line"><span class="comment">        &quot;ID&quot;: &quot;QmdsoQ8xhfkaEpAYCLJ75LEiup9E4ybUdbqDkZZKggfWjS&quot;,</span></div>
<div class="line"><span class="comment">        &quot;Responses&quot;: null,</span></div>
<div class="line"><span class="comment">        &quot;Type&quot;: 6</span></div>
<div class="line"><span class="comment">      },...</span></div>
<div class="line"><span class="comment">    */</span></div>
</div><!-- fragment --><dl class="exception"><dt>Exceptions</dt><dd>
  <table class="exception">
    <tr><td class="paramname">std::exception</td><td>if any error occurs</td></tr>
  </table>
  </dd>
</dl>
<dl class="section since"><dt>Since</dt><dd>version 0.1.0 </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">hash</td><td>Multihash whose providers to find.  </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">providers</td><td>List of providers of <code>hash</code>. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="abe2e1d9f5479fa5007f93a0dee053d12" name="abe2e1d9f5479fa5007f93a0dee053d12"></a>
<h2 class="memtitle"><span class="permalink"><a href="#abe2e1d9f5479fa5007f93a0dee053d12">&#9670;&#160;</a></span>FilesAdd()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ipfs::Client::FilesAdd </td>
          <td>(</td>
          <td class="paramtype">const std::vector&lt; <a class="el" href="structipfs_1_1http_1_1FileUpload.html">http::FileUpload</a> &gt; &amp;&#160;</td>
          <td class="paramname"><em>files</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="namespaceipfs.html#a92ea49891c9d47378b920b41704a29ec">Json</a> *&#160;</td>
          <td class="paramname"><em>result</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Add files to IPFS. </p>
<p>Implements <a href="https://github.com/ipfs/js-ipfs/tree/master/docs/core-api/FILES.md#add">https://github.com/ipfs/js-ipfs/tree/master/docs/core-api/FILES.md#add</a>.</p>
<p>An example usage: </p><div class="fragment"><div class="line">    <a class="code hl_typedef" href="namespaceipfs.html#a92ea49891c9d47378b920b41704a29ec">ipfs::Json</a> add_result;</div>
<div class="line">    client.FilesAdd(</div>
<div class="line">        {{<span class="stringliteral">&quot;foo.txt&quot;</span>, <a class="code hl_enumvalue" href="structipfs_1_1http_1_1FileUpload.html#a76d8546add495d01fd1dcd82ea8170adafc941c889c1d94c918bfd225c22aed65">ipfs::http::FileUpload::Type::kFileContents</a>, <span class="stringliteral">&quot;abcd&quot;</span>},</div>
<div class="line">         {<span class="stringliteral">&quot;bar.txt&quot;</span>, <a class="code hl_enumvalue" href="structipfs_1_1http_1_1FileUpload.html#a76d8546add495d01fd1dcd82ea8170ada5bfe73daee1615146c6c4fa093c7d9ef">ipfs::http::FileUpload::Type::kFileName</a>,</div>
<div class="line">          <span class="stringliteral">&quot;../compile_commands.json&quot;</span>}},</div>
<div class="line">        &amp;add_result);</div>
<div class="line">    std::cout &lt;&lt; <span class="stringliteral">&quot;FilesAdd() result:&quot;</span> &lt;&lt; std::endl</div>
<div class="line">              &lt;&lt; add_result.dump(2) &lt;&lt; std::endl;</div>
<div class="line">    <span class="comment">/* An example output:</span></div>
<div class="line"><span class="comment">    [</span></div>
<div class="line"><span class="comment">      {</span></div>
<div class="line"><span class="comment">        &quot;path&quot;: &quot;foo.txt&quot;,</span></div>
<div class="line"><span class="comment">        &quot;hash&quot;: &quot;QmWPyMW2u7J2Zyzut7TcBMT8pG6F2cB4hmZk1vBJFBt1nP&quot;,</span></div>
<div class="line"><span class="comment">        &quot;size&quot;: 4</span></div>
<div class="line"><span class="comment">      }</span></div>
<div class="line"><span class="comment">      {</span></div>
<div class="line"><span class="comment">        &quot;path&quot;: &quot;bar.txt&quot;,</span></div>
<div class="line"><span class="comment">        &quot;hash&quot;: &quot;QmVjQsMgtRsRKpNM8amTCDRuUPriY8tGswsTpo137jPWwL&quot;,</span></div>
<div class="line"><span class="comment">        &quot;size&quot;: 1176</span></div>
<div class="line"><span class="comment">      },</span></div>
<div class="line"><span class="comment">    ]</span></div>
<div class="line"><span class="comment">    */</span></div>
<div class="ttc" id="astructipfs_1_1http_1_1FileUpload_html_a76d8546add495d01fd1dcd82ea8170ada5bfe73daee1615146c6c4fa093c7d9ef"><div class="ttname"><a href="structipfs_1_1http_1_1FileUpload.html#a76d8546add495d01fd1dcd82ea8170ada5bfe73daee1615146c6c4fa093c7d9ef">ipfs::http::FileUpload::Type::kFileName</a></div><div class="ttdeci">@ kFileName</div><div class="ttdoc">File whose contents is streamed to the web server.</div></div>
</div><!-- fragment --><dl class="exception"><dt>Exceptions</dt><dd>
  <table class="exception">
    <tr><td class="paramname">std::exception</td><td>if any error occurs</td></tr>
  </table>
  </dd>
</dl>
<dl class="section since"><dt>Since</dt><dd>version 0.1.0 </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">files</td><td>List of files to add.  </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">result</td><td>List of results, one per file. For example: [{"path": "foo.txt", "hash": "Qm...", "size": 123}, {"path": ...}, ...] </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a7598eaecec5293f29f84e2fc7ca7bc5b" name="a7598eaecec5293f29f84e2fc7ca7bc5b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7598eaecec5293f29f84e2fc7ca7bc5b">&#9670;&#160;</a></span>FilesGet()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ipfs::Client::FilesGet </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>path</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::iostream *&#160;</td>
          <td class="paramname"><em>response</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get a file from IPFS. </p>
<p>Implements <a href="https://github.com/ipfs/js-ipfs/tree/master/docs/core-api/FILES.md#get">https://github.com/ipfs/js-ipfs/tree/master/docs/core-api/FILES.md#get</a>.</p>
<p>An example usage: </p><div class="fragment"><div class="line">    std::stringstream contents;</div>
<div class="line">    client.FilesGet(</div>
<div class="line">        <span class="stringliteral">&quot;/ipfs/QmYwAPJzv5CZsnA625s3Xf2nemtYgPpHdWEz79ojWnPbdG/readme&quot;</span>,</div>
<div class="line">        &amp;contents);</div>
<div class="line">    std::cout &lt;&lt; <span class="stringliteral">&quot;Retrieved contents: &quot;</span> &lt;&lt; contents.str().substr(0, 8) &lt;&lt; <span class="stringliteral">&quot;...&quot;</span></div>
<div class="line">              &lt;&lt; std::endl;</div>
<div class="line">    <span class="comment">/* An example output:</span></div>
<div class="line"><span class="comment">    Retrieved contents: Hello an...</span></div>
<div class="line"><span class="comment">    */</span></div>
<div class="line">   </div>
</div><!-- fragment --><dl class="exception"><dt>Exceptions</dt><dd>
  <table class="exception">
    <tr><td class="paramname">std::exception</td><td>if any error occurs</td></tr>
  </table>
  </dd>
</dl>
<dl class="section since"><dt>Since</dt><dd>version 0.1.0 </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">path</td><td>Path of the file in IPFS. For example: <code>"/ipfs/QmYwAPJzv5CZsnA625s3Xf2nemtYgPpHdWEz79ojWnPbdG/readme"</code>  </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">response</td><td>The file's contents is written to this stream as it is retrieved from IPFS. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section examples"><dt>Examples</dt><dd><a class="el" href="threading_example_8cc-example.html#a1">threading_example.cc</a>.</dd>
</dl>

</div>
</div>
<a id="a0c0a73fa1a284cd4a12c1395a0eb356c" name="a0c0a73fa1a284cd4a12c1395a0eb356c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0c0a73fa1a284cd4a12c1395a0eb356c">&#9670;&#160;</a></span>FilesLs()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ipfs::Client::FilesLs </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>path</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="namespaceipfs.html#a92ea49891c9d47378b920b41704a29ec">Json</a> *&#160;</td>
          <td class="paramname"><em>result</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>List directory contents for Unix filesystem objects. </p>
<p>Implements <a href="https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ls">https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ls</a>.</p>
<p>An example usage: </p><div class="fragment"><div class="line">    <a class="code hl_typedef" href="namespaceipfs.html#a92ea49891c9d47378b920b41704a29ec">ipfs::Json</a> ls_result;</div>
<div class="line">    client.FilesLs(<span class="stringliteral">&quot;/ipfs/QmYwAPJzv5CZsnA625s3Xf2nemtYgPpHdWEz79ojWnPbdG&quot;</span>,</div>
<div class="line">                   &amp;ls_result);</div>
<div class="line">    std::cout &lt;&lt; <span class="stringliteral">&quot;FilesLs() result:&quot;</span> &lt;&lt; std::endl</div>
<div class="line">              &lt;&lt; ls_result.dump(2) &lt;&lt; std::endl;</div>
<div class="line">    <span class="comment">/* An example output:</span></div>
<div class="line"><span class="comment">    {</span></div>
<div class="line"><span class="comment">      &quot;Arguments&quot;: {</span></div>
<div class="line"><span class="comment">        &quot;/ipfs/QmYwAPJzv5CZsnA625s3Xf2nemtYgPpHdWEz79ojWnPbdG&quot;:</span></div>
<div class="line"><span class="comment">        &quot;QmYwAPJzv5CZsnA625s3Xf2nemtYgPpHdWEz79ojWnPbdG&quot;</span></div>
<div class="line"><span class="comment">      },</span></div>
<div class="line"><span class="comment">      &quot;Objects&quot;: {</span></div>
<div class="line"><span class="comment">        &quot;QmYwAPJzv5CZsnA625s3Xf2nemtYgPpHdWEz79ojWnPbdG&quot;: {</span></div>
<div class="line"><span class="comment">          &quot;Hash&quot;: &quot;QmYwAPJzv5CZsnA625s3Xf2nemtYgPpHdWEz79ojWnPbdG&quot;,</span></div>
<div class="line"><span class="comment">          &quot;Links&quot;: [</span></div>
<div class="line"><span class="comment">            {</span></div>
<div class="line"><span class="comment">              &quot;Hash&quot;: &quot;QmZTR5bcpQD7cFgTorqxZDYaew1Wqgfbd2ud9QqGPAkK2V&quot;,</span></div>
<div class="line"><span class="comment">              &quot;Name&quot;: &quot;about&quot;,</span></div>
<div class="line"><span class="comment">              &quot;Size&quot;: 1677,</span></div>
<div class="line"><span class="comment">              &quot;Type&quot;: &quot;File&quot;</span></div>
<div class="line"><span class="comment">            },</span></div>
<div class="line"><span class="comment">            ...</span></div>
<div class="line"><span class="comment">            {</span></div>
<div class="line"><span class="comment">              &quot;Hash&quot;: &quot;QmdncfsVm2h5Kqq9hPmU7oAVX2zTSVP3L869tgTbPYnsha&quot;,</span></div>
<div class="line"><span class="comment">              &quot;Name&quot;: &quot;quick-start&quot;,</span></div>
<div class="line"><span class="comment">              &quot;Size&quot;: 1717,</span></div>
<div class="line"><span class="comment">              &quot;Type&quot;: &quot;File&quot;</span></div>
<div class="line"><span class="comment">            },</span></div>
<div class="line"><span class="comment">            ...</span></div>
<div class="line"><span class="comment">          ],</span></div>
<div class="line"><span class="comment">          &quot;Size&quot;: 0,</span></div>
<div class="line"><span class="comment">          &quot;Type&quot;: &quot;Directory&quot;</span></div>
<div class="line"><span class="comment">        }</span></div>
<div class="line"><span class="comment">      }</span></div>
<div class="line"><span class="comment">    }</span></div>
<div class="line"><span class="comment">    */</span></div>
</div><!-- fragment --><dl class="exception"><dt>Exceptions</dt><dd>
  <table class="exception">
    <tr><td class="paramname">std::exception</td><td>if any error occurs</td></tr>
  </table>
  </dd>
</dl>
<dl class="section since"><dt>Since</dt><dd>version 0.2.0 </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">path</td><td>The path to an IPFS object.  </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">result</td><td>List of results (files). For example: { "Arguments": { ... }, "Objects": { "QmYwAPJzv5CZsnA625s3Xf2nemtYgPpHdWEz79ojWnPbdG": { "Hash": "QmYwAPJzv5CZsnA625s3Xf2nemtYgPpHdWEz79ojWnPbdG", "Links": [ { "Hash": "QmZTR5bcpQD7cFgTorqxZDYaew1Wqgf...", "Name": "about", "Size": 1677, "Type": "File" }, ... { "Hash": "QmdncfsVm2h5Kqq9hPmU7oAVX2zTSVP...", "Name": "quick-start", "Size": 1717, "Type": "File" }, ... ], "Size": 0, "Type": "Directory" } } } </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ae2ab8a0186ec89f1644a3b1d1a0d20fb" name="ae2ab8a0186ec89f1644a3b1d1a0d20fb"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae2ab8a0186ec89f1644a3b1d1a0d20fb">&#9670;&#160;</a></span>Id()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ipfs::Client::Id </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="namespaceipfs.html#a92ea49891c9d47378b920b41704a29ec">Json</a> *&#160;</td>
          <td class="paramname"><em>id</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Return the identity of the peer. </p>
<p>Implements <a href="https://github.com/ipfs/js-ipfs/tree/master/docs/core-api/MISCELLANEOUS.md#id">https://github.com/ipfs/js-ipfs/tree/master/docs/core-api/MISCELLANEOUS.md#id</a>.</p>
<p>An example usage: </p><div class="fragment"><div class="line">    <a class="code hl_typedef" href="namespaceipfs.html#a92ea49891c9d47378b920b41704a29ec">ipfs::Json</a> id;</div>
<div class="line">    client.Id(&amp;<span class="keywordtype">id</span>);</div>
<div class="line">    std::cout &lt;&lt; <span class="stringliteral">&quot;Peer&#39;s public key: &quot;</span> &lt;&lt; <span class="keywordtype">id</span>[<span class="stringliteral">&quot;PublicKey&quot;</span>] &lt;&lt; std::endl;</div>
<div class="line">    <span class="comment">/* An example output:</span></div>
<div class="line"><span class="comment">    Peer&#39;s public key: &quot;CAASpgIwggEiMA0GCSqGSIb3DQN/ImJDE/CN1eHE....gMBAAE=&quot;</span></div>
<div class="line"><span class="comment">    */</span></div>
</div><!-- fragment --><dl class="exception"><dt>Exceptions</dt><dd>
  <table class="exception">
    <tr><td class="paramname">std::exception</td><td>if any error occurs</td></tr>
  </table>
  </dd>
</dl>
<dl class="section since"><dt>Since</dt><dd>version 0.1.0 </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[out]</td><td class="paramname">id</td><td>The identity of the peer. It contains at least the properties "Addresses", "ID", "PublicKey". </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ada01369adfda81c869a7095d98197961" name="ada01369adfda81c869a7095d98197961"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ada01369adfda81c869a7095d98197961">&#9670;&#160;</a></span>KeyGen()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ipfs::Client::KeyGen </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>key_name</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>key_type</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>key_size</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::string *&#160;</td>
          <td class="paramname"><em>key_id</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Generate a new key. </p>
<p>Implements <a href="https://github.com/ipfs/interface-js-ipfs-core/blob/master/SPEC/KEY.md#keygen">https://github.com/ipfs/interface-js-ipfs-core/blob/master/SPEC/KEY.md#keygen</a>.</p>
<p>An example usage: </p><div class="fragment"><div class="line">    std::string key_id;</div>
<div class="line">    client.KeyGen(<span class="stringliteral">&quot;foobar-key&quot;</span>, <span class="stringliteral">&quot;rsa&quot;</span>, 2048, &amp;key_id);</div>
<div class="line">    std::cout &lt;&lt; <span class="stringliteral">&quot;Generated key: &quot;</span> &lt;&lt; key_id &lt;&lt; std::endl;</div>
<div class="line">    client.KeyGen(<span class="stringliteral">&quot;foobar-key2&quot;</span>, <span class="stringliteral">&quot;rsa&quot;</span>, 2048, &amp;key_id);</div>
<div class="line">    std::cout &lt;&lt; <span class="stringliteral">&quot;Generated key2: &quot;</span> &lt;&lt; key_id &lt;&lt; std::endl;</div>
<div class="line">    <span class="comment">/* An example output:</span></div>
<div class="line"><span class="comment">    Generated key: &quot;QmQeVW8BKqpHbUV5GcecC3wDLF3iqV6ZJhtFN8q8mUYFUs&quot;</span></div>
<div class="line"><span class="comment">    */</span></div>
</div><!-- fragment --><dl class="exception"><dt>Exceptions</dt><dd>
  <table class="exception">
    <tr><td class="paramname">std::exception</td><td>if any error occurs</td></tr>
  </table>
  </dd>
</dl>
<dl class="section since"><dt>Since</dt><dd>version 0.3.0 </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">key_name</td><td>Key name (local, user-friendly name for the key).  </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">key_type</td><td>Key type.  </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">key_size</td><td>Key size.  </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">key_id</td><td>Key CID. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a49d9bb4e44e66170c8e32134300ccfb1" name="a49d9bb4e44e66170c8e32134300ccfb1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a49d9bb4e44e66170c8e32134300ccfb1">&#9670;&#160;</a></span>KeyList()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ipfs::Client::KeyList </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="namespaceipfs.html#a92ea49891c9d47378b920b41704a29ec">Json</a> *&#160;</td>
          <td class="paramname"><em>key_list</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>List all the keys. </p>
<p>Implements <a href="https://github.com/ipfs/interface-js-ipfs-core/blob/master/SPEC/KEY.md#keylist">https://github.com/ipfs/interface-js-ipfs-core/blob/master/SPEC/KEY.md#keylist</a>.</p>
<p>An example usage: </p><div class="fragment"><div class="line">    <a class="code hl_typedef" href="namespaceipfs.html#a92ea49891c9d47378b920b41704a29ec">Json</a> key_list;</div>
<div class="line">    client.KeyList(&amp;key_list);</div>
<div class="line">    std::cout &lt;&lt; <span class="stringliteral">&quot;A list of all local keys: &quot;</span> &lt;&lt; key_list.dump(2) &lt;&lt; std::endl;</div>
<div class="line">    <span class="comment">/* An example output:</span></div>
<div class="line"><span class="comment">    A list of all local keys: [</span></div>
<div class="line"><span class="comment">      {</span></div>
<div class="line"><span class="comment">        &quot;Id&quot;: &quot;QmQ9KnoHP3iRwXLSrdDb8wdJCbEdjk7hVFYGUGDUsdC41k&quot;,</span></div>
<div class="line"><span class="comment">        &quot;Name&quot;: &quot;self&quot;</span></div>
<div class="line"><span class="comment">      },</span></div>
<div class="line"><span class="comment">      {</span></div>
<div class="line"><span class="comment">        &quot;Id&quot;: &quot;QmNjm428tzU5P2ik1yDJNZP2F5zG2jb8fHXZ5D2mzvJGLg&quot;,</span></div>
<div class="line"><span class="comment">        &quot;Name&quot;: &quot;foobar-key&quot;</span></div>
<div class="line"><span class="comment">      }</span></div>
<div class="line"><span class="comment">    ]</span></div>
<div class="line"><span class="comment">    */</span></div>
</div><!-- fragment --><dl class="exception"><dt>Exceptions</dt><dd>
  <table class="exception">
    <tr><td class="paramname">std::exception</td><td>if any error occurs</td></tr>
  </table>
  </dd>
</dl>
<dl class="section since"><dt>Since</dt><dd>version 0.3.0 </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[out]</td><td class="paramname">key_list</td><td>List of all local keys. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a599d2585c57dd3abbc1b497454f3c541" name="a599d2585c57dd3abbc1b497454f3c541"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a599d2585c57dd3abbc1b497454f3c541">&#9670;&#160;</a></span>KeyRename()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ipfs::Client::KeyRename </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>old_key</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>new_key</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Rename an existing key. </p>
<p>Implements <a href="https://github.com/ipfs/interface-js-ipfs-core/blob/master/SPEC/KEY.md#keyrename">https://github.com/ipfs/interface-js-ipfs-core/blob/master/SPEC/KEY.md#keyrename</a>.</p>
<p>An example usage: </p><div class="fragment"><div class="line">    <a class="code hl_typedef" href="namespaceipfs.html#a92ea49891c9d47378b920b41704a29ec">Json</a> key_list_rename;</div>
<div class="line">    <span class="comment">/* Renaming foobar-key2 to foobar-new-key2 */</span></div>
<div class="line">    client.KeyRename(<span class="stringliteral">&quot;foobar-key2&quot;</span>, <span class="stringliteral">&quot;foobar-new-key2&quot;</span>);</div>
<div class="line">    client.KeyList(&amp;key_list_rename);</div>
<div class="line">    std::cout &lt;&lt; <span class="stringliteral">&quot;A list of new local keys: &quot;</span> &lt;&lt; key_list_rename.dump(2)</div>
<div class="line">              &lt;&lt; std::endl;</div>
</div><!-- fragment --><dl class="exception"><dt>Exceptions</dt><dd>
  <table class="exception">
    <tr><td class="paramname">std::exception</td><td>if any error</td></tr>
  </table>
  </dd>
</dl>
<dl class="section since"><dt>Since</dt><dd>version 0.4.0 </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">old_key</td><td>The current key name.  </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">new_key</td><td>The desired key name. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a8c8c8703f4be0e4eb5053301b3577ed8" name="a8c8c8703f4be0e4eb5053301b3577ed8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8c8c8703f4be0e4eb5053301b3577ed8">&#9670;&#160;</a></span>KeyRm()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ipfs::Client::KeyRm </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>key_name</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Remove a key. </p>
<p>Implements <a href="https://github.com/ipfs/interface-js-ipfs-core/blob/master/SPEC/KEY.md#keyrm">https://github.com/ipfs/interface-js-ipfs-core/blob/master/SPEC/KEY.md#keyrm</a>.</p>
<p>An example usage: </p><div class="fragment"><div class="line">    <span class="comment">/* Successful, if no error is thrown. */</span></div>
<div class="line">    client.KeyRm(<span class="stringliteral">&quot;foobar-key&quot;</span>);</div>
</div><!-- fragment --><dl class="exception"><dt>Exceptions</dt><dd>
  <table class="exception">
    <tr><td class="paramname">std::exception</td><td>if any error occurs</td></tr>
  </table>
  </dd>
</dl>
<dl class="section since"><dt>Since</dt><dd>version 0.3.0 </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">key_name</td><td>Key name (local, user-friendly name for the key). </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a93d0ec05a38a4094b3e0dc33c0cc7efe" name="a93d0ec05a38a4094b3e0dc33c0cc7efe"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a93d0ec05a38a4094b3e0dc33c0cc7efe">&#9670;&#160;</a></span>NamePublish()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ipfs::Client::NamePublish </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>object_id</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>key_name</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="namespaceipfs.html#a92ea49891c9d47378b920b41704a29ec">Json</a> &amp;&#160;</td>
          <td class="paramname"><em>options</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::string *&#160;</td>
          <td class="paramname"><em>name_id</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Publish an IPNS name attached to a given value. </p>
<p>Implements <a href="https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/NAME.md#namepublish">https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/NAME.md#namepublish</a>.</p>
<p>An example usage: </p><div class="fragment"><div class="line">    <span class="comment">// The object here is well-known.</span></div>
<div class="line">    std::string object_id = <span class="stringliteral">&quot;QmYwAPJzv5CZsnA625s3Xf2nemtYgPpHdWEz79ojWnPbdG&quot;</span>;</div>
<div class="line">    std::string name;</div>
<div class="line">    <a class="code hl_typedef" href="namespaceipfs.html#a92ea49891c9d47378b920b41704a29ec">ipfs::Json</a> options = {{<span class="stringliteral">&quot;lifetime&quot;</span>, <span class="stringliteral">&quot;4h&quot;</span>}, {<span class="stringliteral">&quot;ttl&quot;</span>, <span class="stringliteral">&quot;60s&quot;</span>}};</div>
<div class="line">    client.NamePublish(object_id, <span class="stringliteral">&quot;foobar-key&quot;</span>, options, &amp;name);</div>
<div class="line">    <span class="comment">/* An example output: &quot;QmbJ5UzreC86qtHrWC2SwWKLsTiLqTuG4cqHHJVdYPK6s9&quot; */</span></div>
<div class="line">    std::cout &lt;&lt; <span class="stringliteral">&quot;Published name: &quot;</span> &lt;&lt; name &lt;&lt; std::endl;</div>
</div><!-- fragment --><dl class="exception"><dt>Exceptions</dt><dd>
  <table class="exception">
    <tr><td class="paramname">std::exception</td><td>if any error occurs</td></tr>
  </table>
  </dd>
</dl>
<dl class="section since"><dt>Since</dt><dd>version 0.4.0 </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">object_id</td><td>Id (multihash) of the object to publish.  </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">key_name</td><td>Name of the key to use. This is the local, human-friendly keyname  </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">options</td><td>Optional JSON parameter providing options. If specified, these will be used to determine how the name is published: { resolve: // bool - Resolve given path before publishing. // Default: true lifetime: // string - Lifetime duration of the record. // Default: 24h ttl: // string - Duration in client's cache. }  </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">name_id</td><td>IPNS name id (multihash) of the named object. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a61596ec86896753addebc2acac01d011" name="a61596ec86896753addebc2acac01d011"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a61596ec86896753addebc2acac01d011">&#9670;&#160;</a></span>NameResolve()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ipfs::Client::NameResolve </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>name_id</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::string *&#160;</td>
          <td class="paramname"><em>path_string</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Resolve an IPNS name. </p>
<p>Implements <a href="https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/NAME.md#nameresolve">https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/NAME.md#nameresolve</a>.</p>
<p>An example usage: </p><div class="fragment"><div class="line">    <span class="comment">// std::string name = &quot;QmTN15ibVzXhNBUZvv4rjHtrsM1xvHe19iy8feGFbUxb3P&quot;;</span></div>
<div class="line">    std::string resolved_object_path;</div>
<div class="line">    client.NameResolve(name, &amp;resolved_object_path);</div>
<div class="line">    <span class="comment">/* The expected output:</span></div>
<div class="line"><span class="comment">     *   &quot;/ipfs/QmYwAPJzv5CZsnA625s3Xf2nemtYgPpHdWEz79ojWnPbdG&quot;; */</span></div>
<div class="line">    std::cout &lt;&lt; <span class="stringliteral">&quot;Resolved name: &quot;</span> &lt;&lt; resolved_object_path &lt;&lt; std::endl;</div>
</div><!-- fragment --><dl class="exception"><dt>Exceptions</dt><dd>
  <table class="exception">
    <tr><td class="paramname">std::exception</td><td>if any error occurs</td></tr>
  </table>
  </dd>
</dl>
<dl class="section since"><dt>Since</dt><dd>version 0.4.0 </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">name_id</td><td>Id (multihash) of the name to resolve.  </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">path_string</td><td>IPFS path string to the resolving object. For example: "/ipfs/QmRrVRGx5xAXX52BYuScmJk1KWPny86BtexP8YNJ8jz76U" </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="aa8d6e75330c6a3d82130f0be4b66b13e" name="aa8d6e75330c6a3d82130f0be4b66b13e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa8d6e75330c6a3d82130f0be4b66b13e">&#9670;&#160;</a></span>ObjectData()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ipfs::Client::ObjectData </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>object_id</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::string *&#160;</td>
          <td class="paramname"><em>data</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get the data field of a MerkleDAG node. </p>
<p>Implements <a href="https://github.com/ipfs/js-ipfs/tree/master/docs/core-api/OBJECT.md#objectdata">https://github.com/ipfs/js-ipfs/tree/master/docs/core-api/OBJECT.md#objectdata</a>.</p>
<p>An example usage: </p><div class="fragment"><div class="line">    std::string data;</div>
<div class="line">    client.ObjectData(<span class="stringliteral">&quot;QmZZmY4KCu9r3e7M2Pcn46Fc5qbn6NpzaAGaYb22kbfTqm&quot;</span>, &amp;data);</div>
<div class="line">    std::cout &lt;&lt; <span class="stringliteral">&quot;Object data: &quot;</span> &lt;&lt; data &lt;&lt; std::endl;</div>
<div class="line">    <span class="comment">/* An example output:</span></div>
<div class="line"><span class="comment">    Object data: another</span></div>
<div class="line"><span class="comment">    */</span></div>
</div><!-- fragment --><dl class="exception"><dt>Exceptions</dt><dd>
  <table class="exception">
    <tr><td class="paramname">std::exception</td><td>if any error occurs</td></tr>
  </table>
  </dd>
</dl>
<dl class="section since"><dt>Since</dt><dd>version 0.1.0 </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">object_id</td><td>Id (multihash) of the MerkleDAG node whose data to fetch.  </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">data</td><td>Raw data of the MerkleDAG node. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="abc9556daecb92afeea9b2adfde034a7f" name="abc9556daecb92afeea9b2adfde034a7f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#abc9556daecb92afeea9b2adfde034a7f">&#9670;&#160;</a></span>ObjectGet()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ipfs::Client::ObjectGet </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>object_id</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="namespaceipfs.html#a92ea49891c9d47378b920b41704a29ec">Json</a> *&#160;</td>
          <td class="paramname"><em>object</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get a MerkleDAG node. </p>
<p>Implements <a href="https://github.com/ipfs/js-ipfs/tree/master/docs/core-api/OBJECT.md#objectget">https://github.com/ipfs/js-ipfs/tree/master/docs/core-api/OBJECT.md#objectget</a>.</p>
<p>An example usage: </p><div class="fragment"><div class="line">    <a class="code hl_typedef" href="namespaceipfs.html#a92ea49891c9d47378b920b41704a29ec">ipfs::Json</a> object;</div>
<div class="line">    client.ObjectGet(<span class="stringliteral">&quot;QmdfTbBqBPQ7VNxZEYEj14VmRuZBkqFbiwReogJgS1zR1n&quot;</span>, &amp;<span class="keywordtype">object</span>);</div>
<div class="line">    std::cout &lt;&lt; <span class="stringliteral">&quot;Object: &quot;</span> &lt;&lt; std::endl &lt;&lt; <span class="keywordtype">object</span>.dump(2) &lt;&lt; std::endl;</div>
<div class="line">    <span class="comment">/* An example output:</span></div>
<div class="line"><span class="comment">    Object:</span></div>
<div class="line"><span class="comment">    {</span></div>
<div class="line"><span class="comment">      &quot;Data&quot;: &quot;another&quot;,</span></div>
<div class="line"><span class="comment">      &quot;Links&quot;: [ {</span></div>
<div class="line"><span class="comment">        &quot;Name&quot;: &quot;some link&quot;,</span></div>
<div class="line"><span class="comment">        &quot;Hash&quot;: &quot;QmXg9Pp2ytZ14xgmQjYEiHjVjMFXzCVVEcRTWJBmLgR39V&quot;,</span></div>
<div class="line"><span class="comment">        &quot;Size&quot;: 8</span></div>
<div class="line"><span class="comment">      } ]</span></div>
<div class="line"><span class="comment">    }</span></div>
<div class="line"><span class="comment">    */</span></div>
</div><!-- fragment --><dl class="exception"><dt>Exceptions</dt><dd>
  <table class="exception">
    <tr><td class="paramname">std::exception</td><td>if any error occurs</td></tr>
  </table>
  </dd>
</dl>
<dl class="section since"><dt>Since</dt><dd>version 0.1.0 </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">object_id</td><td>Id (multihash) of the MerkleDAG node to fetch.  </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">object</td><td>Retrieved MerkleDAG node. For example: {"Data": "abc", "Links": [{"Name": "link1", "Hash": "...", "Size": 8}]} </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a90b1ecd4897794ea6ad5742a41f21525" name="a90b1ecd4897794ea6ad5742a41f21525"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a90b1ecd4897794ea6ad5742a41f21525">&#9670;&#160;</a></span>ObjectLinks()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ipfs::Client::ObjectLinks </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>object_id</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="namespaceipfs.html#a92ea49891c9d47378b920b41704a29ec">Json</a> *&#160;</td>
          <td class="paramname"><em>links</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get links of a MerkleDAG node. </p>
<p>Implements <a href="https://github.com/ipfs/js-ipfs/tree/master/docs/core-api/OBJECT.md#objectlinks">https://github.com/ipfs/js-ipfs/tree/master/docs/core-api/OBJECT.md#objectlinks</a>.</p>
<p>An example usage: </p><div class="fragment"><div class="line">    <a class="code hl_typedef" href="namespaceipfs.html#a92ea49891c9d47378b920b41704a29ec">ipfs::Json</a> links;</div>
<div class="line">    client.ObjectLinks(<span class="stringliteral">&quot;QmYwAPJzv5CZsnA625s3Xf2nemtYgPpHdWEz79ojWnPbdG&quot;</span>,</div>
<div class="line">                       &amp;links);</div>
<div class="line">    std::cout &lt;&lt; <span class="stringliteral">&quot;Object links:&quot;</span> &lt;&lt; std::endl &lt;&lt; links.dump(2) &lt;&lt; std::endl;</div>
<div class="line">    <span class="comment">/* An example output:</span></div>
<div class="line"><span class="comment">    [</span></div>
<div class="line"><span class="comment">      {</span></div>
<div class="line"><span class="comment">        &quot;Hash&quot;: &quot;QmZTR5bcpQD7cFgTorqxZDYaew1Wqgfbd2ud9QqGPAkK2V&quot;,</span></div>
<div class="line"><span class="comment">        &quot;Name&quot;: &quot;about&quot;,</span></div>
<div class="line"><span class="comment">        &quot;Size&quot;: 1688</span></div>
<div class="line"><span class="comment">      },</span></div>
<div class="line"><span class="comment">      {</span></div>
<div class="line"><span class="comment">        &quot;Hash&quot;: &quot;QmYCvbfNbCwFR45HiNP45rwJgvatpiW38D961L5qAhUM5Y&quot;,</span></div>
<div class="line"><span class="comment">        &quot;Name&quot;: &quot;contact&quot;,</span></div>
<div class="line"><span class="comment">        &quot;Size&quot;: 200</span></div>
<div class="line"><span class="comment">      },</span></div>
<div class="line"><span class="comment">      {</span></div>
<div class="line"><span class="comment">        &quot;Hash&quot;: &quot;QmY5heUM5qgRubMDD1og9fhCPA6QdkMp3QCwd4s7gJsyE7&quot;,</span></div>
<div class="line"><span class="comment">        &quot;Name&quot;: &quot;help&quot;,</span></div>
<div class="line"><span class="comment">        &quot;Size&quot;: 322</span></div>
<div class="line"><span class="comment">      },</span></div>
<div class="line"><span class="comment">      {</span></div>
<div class="line"><span class="comment">        &quot;Hash&quot;: &quot;QmdncfsVm2h5Kqq9hPmU7oAVX2zTSVP3L869tgTbPYnsha&quot;,</span></div>
<div class="line"><span class="comment">        &quot;Name&quot;: &quot;quick-start&quot;,</span></div>
<div class="line"><span class="comment">        &quot;Size&quot;: 1728</span></div>
<div class="line"><span class="comment">      },</span></div>
<div class="line"><span class="comment">      {</span></div>
<div class="line"><span class="comment">        &quot;Hash&quot;: &quot;QmPZ9gcCEpqKTo6aq61g2nXGUhM4iCL3ewB6LDXZCtioEB&quot;,</span></div>
<div class="line"><span class="comment">        &quot;Name&quot;: &quot;readme&quot;,</span></div>
<div class="line"><span class="comment">        &quot;Size&quot;: 1102</span></div>
<div class="line"><span class="comment">      },</span></div>
<div class="line"><span class="comment">      {</span></div>
<div class="line"><span class="comment">        &quot;Hash&quot;: &quot;QmTumTjvcYCAvRRwQ8sDRxh8ezmrcr88YFU7iYNroGGTBZ&quot;,</span></div>
<div class="line"><span class="comment">        &quot;Name&quot;: &quot;security-notes&quot;,</span></div>
<div class="line"><span class="comment">        &quot;Size&quot;: 1027</span></div>
<div class="line"><span class="comment">      }</span></div>
<div class="line"><span class="comment">    ]</span></div>
<div class="line"><span class="comment">    */</span></div>
</div><!-- fragment --><dl class="exception"><dt>Exceptions</dt><dd>
  <table class="exception">
    <tr><td class="paramname">std::exception</td><td>if any error occurs</td></tr>
  </table>
  </dd>
</dl>
<dl class="section since"><dt>Since</dt><dd>version 0.1.0 </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">object_id</td><td>Id of the object to query (multihash).  </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">links</td><td>Links of the object. For example: [{"Name": "...", "Hash": "...", "Size": 8}, ...] </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a65d8e5b1ac53f2f54bc9860dea015c6d" name="a65d8e5b1ac53f2f54bc9860dea015c6d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a65d8e5b1ac53f2f54bc9860dea015c6d">&#9670;&#160;</a></span>ObjectNew()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ipfs::Client::ObjectNew </td>
          <td>(</td>
          <td class="paramtype">std::string *&#160;</td>
          <td class="paramname"><em>object_id</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Create a new MerkleDAG node. </p>
<p>Implements <a href="https://github.com/ipfs/js-ipfs/tree/master/docs/core-api/OBJECT.md#objectnew">https://github.com/ipfs/js-ipfs/tree/master/docs/core-api/OBJECT.md#objectnew</a>.</p>
<p>An example usage: </p><div class="fragment"><div class="line">    std::string object_id;</div>
<div class="line">    client.ObjectNew(&amp;object_id);</div>
<div class="line">    std::cout &lt;&lt; <span class="stringliteral">&quot;New object id: &quot;</span> &lt;&lt; object_id &lt;&lt; std::endl;</div>
<div class="line">    <span class="comment">/* An example output:</span></div>
<div class="line"><span class="comment">    New object id: QmdfTbBqBPQ7VNxZEYEj14VmRuZBkqFbiwReogJgS1zR1n</span></div>
<div class="line"><span class="comment">    */</span></div>
</div><!-- fragment --><dl class="exception"><dt>Exceptions</dt><dd>
  <table class="exception">
    <tr><td class="paramname">std::exception</td><td>if any error occurs</td></tr>
  </table>
  </dd>
</dl>
<dl class="section since"><dt>Since</dt><dd>version 0.1.0 </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[out]</td><td class="paramname">object_id</td><td>Id of the newly created object (multihash). </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a5d239a25cd20cbc15c13c96c790abf46" name="a5d239a25cd20cbc15c13c96c790abf46"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5d239a25cd20cbc15c13c96c790abf46">&#9670;&#160;</a></span>ObjectPatchAddLink()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ipfs::Client::ObjectPatchAddLink </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>source</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>link_name</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>link_target</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::string *&#160;</td>
          <td class="paramname"><em>cloned</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Create a new object from an existing MerkleDAG node and add to its links. </p>
<p>Implements <a href="https://github.com/ipfs/js-ipfs/tree/master/docs/core-api/OBJECT.md#objectpatchaddlink">https://github.com/ipfs/js-ipfs/tree/master/docs/core-api/OBJECT.md#objectpatchaddlink</a>.</p>
<p>An example usage: </p><div class="fragment"><div class="line">      <span class="comment">/* Create a new node, upload two files and link them to the node. */</span></div>
<div class="line"> </div>
<div class="line">      std::string orig_id;</div>
<div class="line">      client.ObjectNew(&amp;orig_id);</div>
<div class="line"> </div>
<div class="line">      <a class="code hl_typedef" href="namespaceipfs.html#a92ea49891c9d47378b920b41704a29ec">ipfs::Json</a> added_files;</div>
<div class="line">      client.FilesAdd(</div>
<div class="line">          {{<span class="stringliteral">&quot;file1.txt&quot;</span>, <a class="code hl_enumvalue" href="structipfs_1_1http_1_1FileUpload.html#a76d8546add495d01fd1dcd82ea8170adafc941c889c1d94c918bfd225c22aed65">ipfs::http::FileUpload::Type::kFileContents</a>, <span class="stringliteral">&quot;f1f1&quot;</span>},</div>
<div class="line">           {<span class="stringliteral">&quot;file2.txt&quot;</span>, <a class="code hl_enumvalue" href="structipfs_1_1http_1_1FileUpload.html#a76d8546add495d01fd1dcd82ea8170adafc941c889c1d94c918bfd225c22aed65">ipfs::http::FileUpload::Type::kFileContents</a>, <span class="stringliteral">&quot;f2f2&quot;</span>}},</div>
<div class="line">          &amp;added_files);</div>
<div class="line"> </div>
<div class="line">      std::string new_id;</div>
<div class="line">      client.ObjectPatchAddLink(orig_id, <span class="stringliteral">&quot;link to file1.txt&quot;</span>,</div>
<div class="line">                                added_files[0][<span class="stringliteral">&quot;hash&quot;</span>], &amp;new_id);</div>
<div class="line"> </div>
<div class="line">      <a class="code hl_typedef" href="namespaceipfs.html#a92ea49891c9d47378b920b41704a29ec">ipfs::Json</a> new_object;</div>
<div class="line">      client.ObjectGet(new_id, &amp;new_object);</div>
<div class="line">      std::cout &lt;&lt; <span class="stringliteral">&quot;Added a link to &quot;</span> &lt;&lt; orig_id &lt;&lt; <span class="stringliteral">&quot;.&quot;</span> &lt;&lt; std::endl</div>
<div class="line">                &lt;&lt; <span class="stringliteral">&quot;New object &quot;</span> &lt;&lt; new_id &lt;&lt; <span class="stringliteral">&quot;:&quot;</span> &lt;&lt; std::endl</div>
<div class="line">                &lt;&lt; new_object.dump(2) &lt;&lt; std::endl;</div>
<div class="line">      <span class="comment">/* An example output:</span></div>
<div class="line"><span class="comment">      Added a link to QmdfTbBqBPQ7VNxZEYEj14VmRuZBkqFbiwReogJgS1zR1n.</span></div>
<div class="line"><span class="comment">      New object QmRgn5ZeLiPRwQHqSbMLUZ2gkyLbJiaxVEx3LrDCqqaCAb:</span></div>
<div class="line"><span class="comment">      {</span></div>
<div class="line"><span class="comment">        &quot;Data&quot;: &quot;&quot;,</span></div>
<div class="line"><span class="comment">        &quot;Links&quot;: [</span></div>
<div class="line"><span class="comment">          {</span></div>
<div class="line"><span class="comment">            &quot;Hash&quot;: &quot;QmNYaS23te5Rja36U94JoSTuMxJZmBEnHN8KEcjR6rGRGn&quot;,</span></div>
<div class="line"><span class="comment">            &quot;Name&quot;: &quot;link to file1.txt&quot;,</span></div>
<div class="line"><span class="comment">            &quot;Size&quot;: 12</span></div>
<div class="line"><span class="comment">          }</span></div>
<div class="line"><span class="comment">        ]</span></div>
<div class="line"><span class="comment">      }</span></div>
<div class="line"><span class="comment">      */</span></div>
<div class="line"> </div>
<div class="line">      orig_id = new_id;</div>
<div class="line">      client.ObjectPatchAddLink(orig_id, <span class="stringliteral">&quot;link to file2.txt&quot;</span>,</div>
<div class="line">                                added_files[1][<span class="stringliteral">&quot;hash&quot;</span>], &amp;new_id);</div>
<div class="line"> </div>
<div class="line">      client.ObjectGet(new_id, &amp;new_object);</div>
<div class="line">      std::cout &lt;&lt; <span class="stringliteral">&quot;Added another link to &quot;</span> &lt;&lt; orig_id &lt;&lt; <span class="stringliteral">&quot;.&quot;</span> &lt;&lt; std::endl</div>
<div class="line">                &lt;&lt; <span class="stringliteral">&quot;New object &quot;</span> &lt;&lt; new_id &lt;&lt; <span class="stringliteral">&quot;:&quot;</span> &lt;&lt; std::endl</div>
<div class="line">                &lt;&lt; new_object.dump(2) &lt;&lt; std::endl;</div>
<div class="line">      <span class="comment">/* An example output:</span></div>
<div class="line"><span class="comment">      Added another link to QmRgn5ZeLiPRwQHqSbMLUZ2gkyLbJiaxVEx3LrDCqqaCAb.</span></div>
<div class="line"><span class="comment">      New object QmTxf3cBwrzyRvCZgDQni5wkRkcpM81wiWFTK17okLtT21:</span></div>
<div class="line"><span class="comment">      {</span></div>
<div class="line"><span class="comment">        &quot;Data&quot;: &quot;&quot;,</span></div>
<div class="line"><span class="comment">        &quot;Links&quot;: [</span></div>
<div class="line"><span class="comment">          {</span></div>
<div class="line"><span class="comment">            &quot;Hash&quot;: &quot;QmNYaS23te5Rja36U94JoSTuMxJZmBEnHN8KEcjR6rGRGn&quot;,</span></div>
<div class="line"><span class="comment">            &quot;Name&quot;: &quot;link to file1.txt&quot;,</span></div>
<div class="line"><span class="comment">            &quot;Size&quot;: 12</span></div>
<div class="line"><span class="comment">          },</span></div>
<div class="line"><span class="comment">          {</span></div>
<div class="line"><span class="comment">            &quot;Hash&quot;: &quot;QmYuNVU4vwpXqX9RLv47HbmiveWwZvLBsXyYbUtEQMJYGQ&quot;,</span></div>
<div class="line"><span class="comment">            &quot;Name&quot;: &quot;link to file2.txt&quot;,</span></div>
<div class="line"><span class="comment">            &quot;Size&quot;: 12</span></div>
<div class="line"><span class="comment">          }</span></div>
<div class="line"><span class="comment">        ]</span></div>
<div class="line"><span class="comment">      }</span></div>
<div class="line"><span class="comment">      */</span></div>
</div><!-- fragment --><dl class="exception"><dt>Exceptions</dt><dd>
  <table class="exception">
    <tr><td class="paramname">std::exception</td><td>if any error occurs</td></tr>
  </table>
  </dd>
</dl>
<dl class="section since"><dt>Since</dt><dd>version 0.1.0 </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">source</td><td>Id of the object to clone (multihash).  </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">link_name</td><td>Link name.  </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">link_target</td><td>Id of the object that the link points to (multihash).  </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">cloned</td><td>Id of the newly created (cloned) object (multihash). </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="af414390a18a656fd2568cf70481e51b4" name="af414390a18a656fd2568cf70481e51b4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af414390a18a656fd2568cf70481e51b4">&#9670;&#160;</a></span>ObjectPatchAppendData()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ipfs::Client::ObjectPatchAppendData </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>source</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="structipfs_1_1http_1_1FileUpload.html">http::FileUpload</a> &amp;&#160;</td>
          <td class="paramname"><em>data</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::string *&#160;</td>
          <td class="paramname"><em>cloned</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Create a new object from an existing MerkleDAG node and append data to it. </p>
<p>Implements <a href="https://github.com/ipfs/js-ipfs/tree/master/docs/core-api/OBJECT.md#objectpatchappenddata">https://github.com/ipfs/js-ipfs/tree/master/docs/core-api/OBJECT.md#objectpatchappenddata</a>.</p>
<p>An example usage: </p><div class="fragment"><div class="line">      <span class="comment">/* std::string target_id = &quot;QmTxf3cBwrzyRvCZgDQni...LtT21&quot; for example. */</span></div>
<div class="line">      std::string with_appended_data_id;</div>
<div class="line"> </div>
<div class="line">      client.ObjectPatchAppendData(</div>
<div class="line">          target_id,</div>
<div class="line">          {<span class="stringliteral">&quot;&quot;</span>, <a class="code hl_enumvalue" href="structipfs_1_1http_1_1FileUpload.html#a76d8546add495d01fd1dcd82ea8170adafc941c889c1d94c918bfd225c22aed65">ipfs::http::FileUpload::Type::kFileContents</a>, <span class="stringliteral">&quot;appended data&quot;</span>},</div>
<div class="line">          &amp;with_appended_data_id);</div>
<div class="line"> </div>
<div class="line">      <a class="code hl_typedef" href="namespaceipfs.html#a92ea49891c9d47378b920b41704a29ec">ipfs::Json</a> with_appended_data;</div>
<div class="line">      client.ObjectGet(with_appended_data_id, &amp;with_appended_data);</div>
<div class="line">      std::cout &lt;&lt; <span class="stringliteral">&quot;Appended data to &quot;</span> &lt;&lt; target_id &lt;&lt; <span class="stringliteral">&quot;.&quot;</span> &lt;&lt; std::endl</div>
<div class="line">                &lt;&lt; <span class="stringliteral">&quot;New object &quot;</span> &lt;&lt; with_appended_data_id &lt;&lt; <span class="stringliteral">&quot;:&quot;</span> &lt;&lt; std::endl</div>
<div class="line">                &lt;&lt; with_appended_data.dump(2) &lt;&lt; std::endl;</div>
<div class="line">      <span class="comment">/* An example output:</span></div>
<div class="line"><span class="comment">      Appended data to QmTxf3cBwrzyRvCZgDQni5wkRkcpM81wiWFTK17okLtT21.</span></div>
<div class="line"><span class="comment">      New object QmbDtmUVyiN8vFZr8cDTpuVtZwnVd3k6wqpEq3NvE67bTj:</span></div>
<div class="line"><span class="comment">      {</span></div>
<div class="line"><span class="comment">        &quot;Data&quot;: &quot;appended data&quot;,</span></div>
<div class="line"><span class="comment">        &quot;Links&quot;: [</span></div>
<div class="line"><span class="comment">          {</span></div>
<div class="line"><span class="comment">            &quot;Hash&quot;: &quot;QmNYaS23te5Rja36U94JoSTuMxJZmBEnHN8KEcjR6rGRGn&quot;,</span></div>
<div class="line"><span class="comment">            &quot;Name&quot;: &quot;link to file1.txt&quot;,</span></div>
<div class="line"><span class="comment">            &quot;Size&quot;: 12</span></div>
<div class="line"><span class="comment">          },</span></div>
<div class="line"><span class="comment">          {</span></div>
<div class="line"><span class="comment">            &quot;Hash&quot;: &quot;QmYuNVU4vwpXqX9RLv47HbmiveWwZvLBsXyYbUtEQMJYGQ&quot;,</span></div>
<div class="line"><span class="comment">            &quot;Name&quot;: &quot;link to file2.txt&quot;,</span></div>
<div class="line"><span class="comment">            &quot;Size&quot;: 12</span></div>
<div class="line"><span class="comment">          }</span></div>
<div class="line"><span class="comment">        ]</span></div>
<div class="line"><span class="comment">      }</span></div>
<div class="line"><span class="comment">      */</span></div>
</div><!-- fragment --><dl class="exception"><dt>Exceptions</dt><dd>
  <table class="exception">
    <tr><td class="paramname">std::exception</td><td>if any error occurs</td></tr>
  </table>
  </dd>
</dl>
<dl class="section since"><dt>Since</dt><dd>version 0.1.0 </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">source</td><td>Id of the object to append data to (multihash).  </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">data</td><td>Data to be appended.  </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">cloned</td><td>Id of the newly created (cloned) object (multihash). </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a149b21207f70215ad0097764e6ae2e65" name="a149b21207f70215ad0097764e6ae2e65"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a149b21207f70215ad0097764e6ae2e65">&#9670;&#160;</a></span>ObjectPatchRmLink()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ipfs::Client::ObjectPatchRmLink </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>source</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>link_name</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::string *&#160;</td>
          <td class="paramname"><em>cloned</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Create a new object from an existing MerkleDAG node and remove one of its links. </p>
<p>Implements <a href="https://github.com/ipfs/js-ipfs/tree/master/docs/core-api/OBJECT.md#objectpatchrmlink">https://github.com/ipfs/js-ipfs/tree/master/docs/core-api/OBJECT.md#objectpatchrmlink</a>.</p>
<p>An example usage: </p><div class="fragment"><div class="line">      <span class="comment">/* std::string target_id = &quot;QmTxf3cBwrzyRvCZgDQni...LtT21&quot; for example. */</span></div>
<div class="line">      std::string without_link_id;</div>
<div class="line"> </div>
<div class="line">      client.ObjectPatchRmLink(target_id, <span class="stringliteral">&quot;link to file1.txt&quot;</span>,</div>
<div class="line">                               &amp;without_link_id);</div>
<div class="line"> </div>
<div class="line">      <a class="code hl_typedef" href="namespaceipfs.html#a92ea49891c9d47378b920b41704a29ec">ipfs::Json</a> without_link;</div>
<div class="line">      client.ObjectGet(without_link_id, &amp;without_link);</div>
<div class="line">      std::cout &lt;&lt; <span class="stringliteral">&quot;Removed a link from &quot;</span> &lt;&lt; target_id &lt;&lt; <span class="stringliteral">&quot;.&quot;</span> &lt;&lt; std::endl</div>
<div class="line">                &lt;&lt; <span class="stringliteral">&quot;New object &quot;</span> &lt;&lt; without_link_id &lt;&lt; <span class="stringliteral">&quot;:&quot;</span> &lt;&lt; std::endl</div>
<div class="line">                &lt;&lt; without_link.dump(2) &lt;&lt; std::endl;</div>
<div class="line">      <span class="comment">/* An example output:</span></div>
<div class="line"><span class="comment">      Removed a link from QmTxf3cBwrzyRvCZgDQni5wkRkcpM81wiWFTK17okLtT21.</span></div>
<div class="line"><span class="comment">      New object QmVUXX6chMMT4cPosYsLq64FZ21ie94KPknSnWfG8YDJBB:</span></div>
<div class="line"><span class="comment">      {</span></div>
<div class="line"><span class="comment">        &quot;Data&quot;: &quot;&quot;,</span></div>
<div class="line"><span class="comment">        &quot;Links&quot;: [</span></div>
<div class="line"><span class="comment">          {</span></div>
<div class="line"><span class="comment">            &quot;Hash&quot;: &quot;QmYuNVU4vwpXqX9RLv47HbmiveWwZvLBsXyYbUtEQMJYGQ&quot;,</span></div>
<div class="line"><span class="comment">            &quot;Name&quot;: &quot;link to file2.txt&quot;,</span></div>
<div class="line"><span class="comment">            &quot;Size&quot;: 12</span></div>
<div class="line"><span class="comment">          }</span></div>
<div class="line"><span class="comment">        ]</span></div>
<div class="line"><span class="comment">      }</span></div>
<div class="line"><span class="comment">      */</span></div>
<div class="line"> </div>
<div class="line">      <span class="keywordtype">bool</span> removal_ok;</div>
<div class="line">      <span class="keywordflow">try</span> {</div>
<div class="line">        client.ObjectPatchRmLink(target_id, <span class="stringliteral">&quot;nonexistent&quot;</span>, &amp;without_link_id);</div>
<div class="line">        removal_ok = <span class="keyword">true</span>;</div>
<div class="line">      } <span class="keywordflow">catch</span> (<span class="keyword">const</span> std::exception&amp;) {</div>
<div class="line">        removal_ok = <span class="keyword">false</span>;</div>
<div class="line">      }</div>
<div class="line"> </div>
<div class="line">      <span class="keywordflow">if</span> (removal_ok) {</div>
<div class="line">        <span class="keywordflow">throw</span> std::runtime_error(</div>
<div class="line">            <span class="stringliteral">&quot;Removal of nonexistent link succeeded but should have failed.&quot;</span>);</div>
<div class="line">      }</div>
</div><!-- fragment --><dl class="exception"><dt>Exceptions</dt><dd>
  <table class="exception">
    <tr><td class="paramname">std::exception</td><td>if any error occurs</td></tr>
  </table>
  </dd>
</dl>
<dl class="section since"><dt>Since</dt><dd>version 0.1.0 </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">source</td><td>Id of the object to remove the link from (multihash).  </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">link_name</td><td>Name of the link to remove.  </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">cloned</td><td>Id of the newly created (cloned) object (multihash). </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a949a35293f16868980ab013606264b24" name="a949a35293f16868980ab013606264b24"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a949a35293f16868980ab013606264b24">&#9670;&#160;</a></span>ObjectPatchSetData()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ipfs::Client::ObjectPatchSetData </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>source</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="structipfs_1_1http_1_1FileUpload.html">http::FileUpload</a> &amp;&#160;</td>
          <td class="paramname"><em>data</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::string *&#160;</td>
          <td class="paramname"><em>cloned</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Create a new object from an existing MerkleDAG node and set its data. </p>
<p>Implements <a href="https://github.com/ipfs/js-ipfs/tree/master/docs/core-api/OBJECT.md#objectpatchsetdata">https://github.com/ipfs/js-ipfs/tree/master/docs/core-api/OBJECT.md#objectpatchsetdata</a>.</p>
<p>An example usage: </p><div class="fragment"><div class="line">      <span class="comment">/* std::string target_id = &quot;QmbDtmUVyiN8vFZr8cDTp...67bTj&quot; for example. */</span></div>
<div class="line">      std::string with_new_data_id;</div>
<div class="line"> </div>
<div class="line">      client.ObjectPatchSetData(</div>
<div class="line">          target_id,</div>
<div class="line">          {<span class="stringliteral">&quot;&quot;</span>, <a class="code hl_enumvalue" href="structipfs_1_1http_1_1FileUpload.html#a76d8546add495d01fd1dcd82ea8170adafc941c889c1d94c918bfd225c22aed65">ipfs::http::FileUpload::Type::kFileContents</a>, <span class="stringliteral">&quot;new data&quot;</span>},</div>
<div class="line">          &amp;with_new_data_id);</div>
<div class="line"> </div>
<div class="line">      <a class="code hl_typedef" href="namespaceipfs.html#a92ea49891c9d47378b920b41704a29ec">ipfs::Json</a> with_new_data;</div>
<div class="line">      client.ObjectGet(with_new_data_id, &amp;with_new_data);</div>
<div class="line">      std::cout &lt;&lt; <span class="stringliteral">&quot;Set the data of &quot;</span> &lt;&lt; target_id &lt;&lt; <span class="stringliteral">&quot;.&quot;</span> &lt;&lt; std::endl</div>
<div class="line">                &lt;&lt; <span class="stringliteral">&quot;New object &quot;</span> &lt;&lt; with_new_data_id &lt;&lt; <span class="stringliteral">&quot;:&quot;</span> &lt;&lt; std::endl</div>
<div class="line">                &lt;&lt; with_new_data.dump(2) &lt;&lt; std::endl;</div>
<div class="line">      <span class="comment">/* An example output:</span></div>
<div class="line"><span class="comment">      Set the data of QmbDtmUVyiN8vFZr8cDTpuVtZwnVd3k6wqpEq3NvE67bTj.</span></div>
<div class="line"><span class="comment">      New object QmZ19WxdWzPbLTyTkb1MYDvpdLi1pu1fRtECAiHzhLJAxz:</span></div>
<div class="line"><span class="comment">      {</span></div>
<div class="line"><span class="comment">        &quot;Data&quot;: &quot;new data&quot;,</span></div>
<div class="line"><span class="comment">        &quot;Links&quot;: [</span></div>
<div class="line"><span class="comment">          {</span></div>
<div class="line"><span class="comment">            &quot;Hash&quot;: &quot;QmNYaS23te5Rja36U94JoSTuMxJZmBEnHN8KEcjR6rGRGn&quot;,</span></div>
<div class="line"><span class="comment">            &quot;Name&quot;: &quot;link to file1.txt&quot;,</span></div>
<div class="line"><span class="comment">            &quot;Size&quot;: 12</span></div>
<div class="line"><span class="comment">          },</span></div>
<div class="line"><span class="comment">          {</span></div>
<div class="line"><span class="comment">            &quot;Hash&quot;: &quot;QmYuNVU4vwpXqX9RLv47HbmiveWwZvLBsXyYbUtEQMJYGQ&quot;,</span></div>
<div class="line"><span class="comment">            &quot;Name&quot;: &quot;link to file2.txt&quot;,</span></div>
<div class="line"><span class="comment">            &quot;Size&quot;: 12</span></div>
<div class="line"><span class="comment">          }</span></div>
<div class="line"><span class="comment">        ]</span></div>
<div class="line"><span class="comment">      }</span></div>
<div class="line"><span class="comment">      */</span></div>
</div><!-- fragment --><dl class="exception"><dt>Exceptions</dt><dd>
  <table class="exception">
    <tr><td class="paramname">std::exception</td><td>if any error occurs</td></tr>
  </table>
  </dd>
</dl>
<dl class="section since"><dt>Since</dt><dd>version 0.1.0 </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">source</td><td>Id of the object whose data to set (multihash).  </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">data</td><td>Data to be set.  </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">cloned</td><td>Id of the newly created (cloned) object (multihash). </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a783ddccb9559315599b07343b153ffc2" name="a783ddccb9559315599b07343b153ffc2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a783ddccb9559315599b07343b153ffc2">&#9670;&#160;</a></span>ObjectPut()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ipfs::Client::ObjectPut </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="namespaceipfs.html#a92ea49891c9d47378b920b41704a29ec">Json</a> &amp;&#160;</td>
          <td class="paramname"><em>object</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="namespaceipfs.html#a92ea49891c9d47378b920b41704a29ec">Json</a> *&#160;</td>
          <td class="paramname"><em>object_stored</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Store a MerkleDAG node. </p>
<p>Implements <a href="https://github.com/ipfs/js-ipfs/tree/master/docs/core-api/OBJECT.md#objectput">https://github.com/ipfs/js-ipfs/tree/master/docs/core-api/OBJECT.md#objectput</a>.</p>
<p>An example usage: </p><div class="fragment"><div class="line">    <a class="code hl_typedef" href="namespaceipfs.html#a92ea49891c9d47378b920b41704a29ec">ipfs::Json</a> object_to_store = R<span class="stringliteral">&quot;(</span></div>
<div class="line"><span class="stringliteral">      {</span></div>
<div class="line"><span class="stringliteral">          &quot;Data&quot;: &quot;another&quot;,</span></div>
<div class="line"><span class="stringliteral">          &quot;Links&quot;: [ {</span></div>
<div class="line"><span class="stringliteral">              &quot;Name&quot;: &quot;some link&quot;,</span></div>
<div class="line"><span class="stringliteral">              &quot;Hash&quot;: &quot;QmXg9Pp2ytZ14xgmQjYEiHjVjMFXzCVVEcRTWJBmLgR39V&quot;,</span></div>
<div class="line"><span class="stringliteral">              &quot;Size&quot;: 8</span></div>
<div class="line"><span class="stringliteral">          } ]</span></div>
<div class="line"><span class="stringliteral">      }</span></div>
<div class="line"><span class="stringliteral">    )&quot;_json;</span></div>
<div class="line"><span class="stringliteral">    <a class="code hl_typedef" href="namespaceipfs.html#a92ea49891c9d47378b920b41704a29ec">ipfs::Json</a> object_stored;</span></div>
<div class="line"><span class="stringliteral">    client.ObjectPut(object_to_store, &amp;object_stored);</span></div>
<div class="line"><span class="stringliteral">    std::cout &lt;&lt; </span><span class="stringliteral">&quot;Object to store:&quot;</span> &lt;&lt; std::endl</div>
<div class="line">              &lt;&lt; object_to_store.dump(2) &lt;&lt; std::endl;</div>
<div class="line">    std::cout &lt;&lt; <span class="stringliteral">&quot;Stored object:&quot;</span> &lt;&lt; std::endl</div>
<div class="line">              &lt;&lt; object_stored.dump(2) &lt;&lt; std::endl;</div>
<div class="line">    <span class="comment">/* An example output:</span></div>
<div class="line"><span class="comment">    Object to store:</span></div>
<div class="line"><span class="comment">    {</span></div>
<div class="line"><span class="comment">      &quot;Data&quot;: &quot;another&quot;,</span></div>
<div class="line"><span class="comment">      &quot;Links&quot;: [</span></div>
<div class="line"><span class="comment">        {</span></div>
<div class="line"><span class="comment">          &quot;Hash&quot;: &quot;QmXg9Pp2ytZ14xgmQjYEiHjVjMFXzCVVEcRTWJBmLgR39V&quot;,</span></div>
<div class="line"><span class="comment">          &quot;Name&quot;: &quot;some link&quot;,</span></div>
<div class="line"><span class="comment">          &quot;Size&quot;: 8</span></div>
<div class="line"><span class="comment">        }</span></div>
<div class="line"><span class="comment">      ]</span></div>
<div class="line"><span class="comment">    }</span></div>
<div class="line"><span class="comment">    Stored object:</span></div>
<div class="line"><span class="comment">    {</span></div>
<div class="line"><span class="comment">      &quot;Hash&quot;: &quot;QmZZmY4KCu9r3e7M2Pcn46Fc5qbn6NpzaAGaYb22kbfTqm&quot;,</span></div>
<div class="line"><span class="comment">    }</span></div>
<div class="line"><span class="comment">    */</span></div>
</div><!-- fragment --><dl class="exception"><dt>Exceptions</dt><dd>
  <table class="exception">
    <tr><td class="paramname">std::exception</td><td>if any error occurs</td></tr>
  </table>
  </dd>
</dl>
<dl class="section since"><dt>Since</dt><dd>version 0.1.0 </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">object</td><td>Node to store.  </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">object_stored</td><td>Stored node. Should be the same as the provided <code>object</code> plus the stored object's multihash id. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a2fcb017f9de04c221b78e47cf062039d" name="a2fcb017f9de04c221b78e47cf062039d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2fcb017f9de04c221b78e47cf062039d">&#9670;&#160;</a></span>ObjectStat()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ipfs::Client::ObjectStat </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>object_id</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="namespaceipfs.html#a92ea49891c9d47378b920b41704a29ec">Json</a> *&#160;</td>
          <td class="paramname"><em>stat</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get stats about a MerkleDAG node. </p>
<p>Implements <a href="https://github.com/ipfs/js-ipfs/tree/master/docs/core-api/OBJECT.md#objectstat">https://github.com/ipfs/js-ipfs/tree/master/docs/core-api/OBJECT.md#objectstat</a>.</p>
<p>An example usage: </p><div class="fragment"><div class="line">    <a class="code hl_typedef" href="namespaceipfs.html#a92ea49891c9d47378b920b41704a29ec">ipfs::Json</a> stat;</div>
<div class="line">    client.ObjectStat(<span class="stringliteral">&quot;QmYwAPJzv5CZsnA625s3Xf2nemtYgPpHdWEz79ojWnPbdG&quot;</span>, &amp;stat);</div>
<div class="line">    std::cout &lt;&lt; <span class="stringliteral">&quot;Object data size: &quot;</span> &lt;&lt; stat[<span class="stringliteral">&quot;DataSize&quot;</span>] &lt;&lt; std::endl;</div>
<div class="line">    <span class="comment">/* An example output:</span></div>
<div class="line"><span class="comment">    Object data size: 2</span></div>
<div class="line"><span class="comment">    */</span></div>
</div><!-- fragment --><dl class="exception"><dt>Exceptions</dt><dd>
  <table class="exception">
    <tr><td class="paramname">std::exception</td><td>if any error occurs</td></tr>
  </table>
  </dd>
</dl>
<dl class="section since"><dt>Since</dt><dd>version 0.1.0 </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">object_id</td><td>Id of the object to query (multihash).  </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">stat</td><td>Stats about the object. For example: {"NumLinks": 0, "BlockSize": 10, "LinksSize": 2, ...} </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a0fdc4ced9fc352a468dac2ec2ae70dcd" name="a0fdc4ced9fc352a468dac2ec2ae70dcd"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0fdc4ced9fc352a468dac2ec2ae70dcd">&#9670;&#160;</a></span>operator=() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classipfs_1_1Client.html">Client</a> &amp; ipfs::Client::operator= </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classipfs_1_1Client.html">Client</a> &amp;&amp;&#160;</td>
          <td class="paramname"><em>other</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">noexcept</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Move assignment operator. </p>
<dl class="section return"><dt>Returns</dt><dd>*this </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in,out]</td><td class="paramname">other</td><td>Other client connection to be moved. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ab3ff2cc70ec6a65761d2d088a9ba9323" name="ab3ff2cc70ec6a65761d2d088a9ba9323"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab3ff2cc70ec6a65761d2d088a9ba9323">&#9670;&#160;</a></span>operator=() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classipfs_1_1Client.html">Client</a> &amp; ipfs::Client::operator= </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classipfs_1_1Client.html">Client</a> &amp;&#160;</td>
          <td class="paramname"><em>other</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Copy assignment operator. </p>
<dl class="section return"><dt>Returns</dt><dd>*this </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">other</td><td>Other client connection to be copied. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a18e6d6a299748d3ba3a681bac7c5bd5d" name="a18e6d6a299748d3ba3a681bac7c5bd5d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a18e6d6a299748d3ba3a681bac7c5bd5d">&#9670;&#160;</a></span>PinAdd()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ipfs::Client::PinAdd </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>object_id</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Pin a given IPFS object. </p>
<p>Implements <a href="https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/PIN.md#pinadd">https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/PIN.md#pinadd</a>.</p>
<p>An example usage: </p><div class="fragment"><div class="line">    <span class="comment">/* std::string object_id = &quot;QmdfTbBqBPQ7VNxZEYEj14V...1zR1n&quot; for example. */</span></div>
<div class="line">    client.PinAdd(object_id);</div>
<div class="line"> </div>
<div class="line">    std::cout &lt;&lt; <span class="stringliteral">&quot;Pinned object: &quot;</span> &lt;&lt; object_id &lt;&lt; std::endl;</div>
<div class="line">    <span class="comment">/* An example output:</span></div>
<div class="line"><span class="comment">    Pinned object: QmdfTbBqBPQ7VNxZEYEj14VmRuZBkqFbiwReogJgS1zR1n</span></div>
<div class="line"><span class="comment">    */</span></div>
</div><!-- fragment --><dl class="exception"><dt>Exceptions</dt><dd>
  <table class="exception">
    <tr><td class="paramname">std::exception</td><td>if any error occurs</td></tr>
  </table>
  </dd>
</dl>
<dl class="section since"><dt>Since</dt><dd>version 0.1.0 </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">object_id</td><td>Id of the object to pin (multihash). </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a1d775b25a4d80ba95c040694e9c9d877" name="a1d775b25a4d80ba95c040694e9c9d877"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1d775b25a4d80ba95c040694e9c9d877">&#9670;&#160;</a></span>PinLs() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ipfs::Client::PinLs </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>object_id</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="namespaceipfs.html#a92ea49891c9d47378b920b41704a29ec">Json</a> *&#160;</td>
          <td class="paramname"><em>pinned</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>List the objects pinned under a specific hash. </p>
<p>Implements <a href="https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/PIN.md#pinls">https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/PIN.md#pinls</a>.</p>
<p>An example usage: </p><div class="fragment"><div class="line">    <span class="comment">/* std::string object_id = &quot;QmdfTbBqBPQ7VNxZEYEj14V...1zR1n&quot; for example. */</span></div>
<div class="line">    client.PinLs(object_id, &amp;pinned);</div>
<div class="line"> </div>
<div class="line">    std::cout &lt;&lt; <span class="stringliteral">&quot;List pinned objects under &quot;</span> &lt;&lt; object_id &lt;&lt; <span class="stringliteral">&quot;:&quot;</span> &lt;&lt; std::endl</div>
<div class="line">              &lt;&lt; pinned.dump(2) &lt;&lt; std::endl;</div>
<div class="line">    <span class="comment">/* An example output:</span></div>
<div class="line"><span class="comment">    List pinned objects under QmdfTbBqBPQ7VNxZEYEj14VmRuZBkqFbiwReogJgS1zR1n:</span></div>
<div class="line"><span class="comment">    {</span></div>
<div class="line"><span class="comment">      &quot;Keys&quot;: {</span></div>
<div class="line"><span class="comment">        &quot;QmdfTbBqBPQ7VNxZEYEj14VmRuZBkqFbiwReogJgS1zR1n&quot;: {</span></div>
<div class="line"><span class="comment">          &quot;Type&quot;: &quot;recursive&quot;</span></div>
<div class="line"><span class="comment">        }</span></div>
<div class="line"><span class="comment">      }</span></div>
<div class="line"><span class="comment">    }</span></div>
<div class="line"><span class="comment">    */</span></div>
</div><!-- fragment --><dl class="exception"><dt>Exceptions</dt><dd>
  <table class="exception">
    <tr><td class="paramname">std::exception</td><td>if any error occurs</td></tr>
  </table>
  </dd>
</dl>
<dl class="section since"><dt>Since</dt><dd>version 0.1.0 </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">object_id</td><td>Id of the object to list (multihash).  </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">pinned</td><td>List of pinned objects. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a5c6f313e1d361f4d21a7a67915e6b19f" name="a5c6f313e1d361f4d21a7a67915e6b19f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5c6f313e1d361f4d21a7a67915e6b19f">&#9670;&#160;</a></span>PinLs() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ipfs::Client::PinLs </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="namespaceipfs.html#a92ea49891c9d47378b920b41704a29ec">Json</a> *&#160;</td>
          <td class="paramname"><em>pinned</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>List all the objects pinned to local storage. </p>
<p>Implements <a href="https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/PIN.md#pinls">https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/PIN.md#pinls</a>.</p>
<p>An example usage: </p><div class="fragment"><div class="line">    <a class="code hl_typedef" href="namespaceipfs.html#a92ea49891c9d47378b920b41704a29ec">ipfs::Json</a> pinned;</div>
<div class="line"> </div>
<div class="line">    client.PinLs(&amp;pinned);</div>
<div class="line"> </div>
<div class="line">    std::cout &lt;&lt; <span class="stringliteral">&quot;List of all pinned objects:&quot;</span> &lt;&lt; std::endl</div>
<div class="line">              &lt;&lt; pinned.dump(2) &lt;&lt; std::endl;</div>
<div class="line">    <span class="comment">/* An example output:</span></div>
<div class="line"><span class="comment">    List of all pinned objects:</span></div>
<div class="line"><span class="comment">    {</span></div>
<div class="line"><span class="comment">      &quot;Keys&quot;: {</span></div>
<div class="line"><span class="comment">        &quot;QmNYaS23te5Rja36U94JoSTuMxJZmBEnHN8KEcjR6rGRGn&quot;: {</span></div>
<div class="line"><span class="comment">          &quot;Type&quot;: &quot;indirect&quot;</span></div>
<div class="line"><span class="comment">        },</span></div>
<div class="line"><span class="comment">        &quot;QmUNLLsPACCz1vLxQVkXqqLX5R1X345qqfHbsf67hvA3Nn&quot;: {</span></div>
<div class="line"><span class="comment">          &quot;Type&quot;: &quot;recursive&quot;</span></div>
<div class="line"><span class="comment">        },</span></div>
<div class="line"><span class="comment">        &quot;Qmf5t6BgYbiT2usHRToVzLu5DNHfH39S4dq6JTxf69Npzt&quot;: {</span></div>
<div class="line"><span class="comment">          &quot;Type&quot;: &quot;indirect&quot;</span></div>
<div class="line"><span class="comment">        }</span></div>
<div class="line"><span class="comment">      }</span></div>
<div class="line"><span class="comment">    }</span></div>
<div class="line"><span class="comment">    */</span></div>
</div><!-- fragment --><dl class="exception"><dt>Exceptions</dt><dd>
  <table class="exception">
    <tr><td class="paramname">std::exception</td><td>if any error occurs</td></tr>
  </table>
  </dd>
</dl>
<dl class="section since"><dt>Since</dt><dd>version 0.1.0 </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[out]</td><td class="paramname">pinned</td><td>List of pinned objects. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a1f5d4bfb19f0f739ce8f888c7cbbcc44" name="a1f5d4bfb19f0f739ce8f888c7cbbcc44"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1f5d4bfb19f0f739ce8f888c7cbbcc44">&#9670;&#160;</a></span>PinRm()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ipfs::Client::PinRm </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>object_id</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classipfs_1_1Client.html#adc5716aa4272ff2bedcae954339c77d0">PinRmOptions</a>&#160;</td>
          <td class="paramname"><em>options</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Unpin an object. </p>
<p>Implements <a href="https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/PIN.md#pinrm">https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/PIN.md#pinrm</a>.</p>
<p>An example usage: </p><div class="fragment"><div class="line">    <span class="comment">/* std::string object_id = &quot;QmdfTbBqBPQ7VNxZEYEj14V...1zR1n&quot; for example. */</span></div>
<div class="line"> </div>
<div class="line">    <span class="keywordtype">bool</span> unpinned;</div>
<div class="line">    <span class="keywordflow">try</span> {</div>
<div class="line">      client.PinRm(object_id, <a class="code hl_enumvalue" href="classipfs_1_1Client.html#adc5716aa4272ff2bedcae954339c77d0a254f9369d66a06a09f3ac854e72f6825">ipfs::Client::PinRmOptions::NON_RECURSIVE</a>);</div>
<div class="line">      unpinned = <span class="keyword">true</span>;</div>
<div class="line">    } <span class="keywordflow">catch</span> (<span class="keyword">const</span> std::exception&amp;) {</div>
<div class="line">      unpinned = <span class="keyword">false</span>;</div>
<div class="line">    }</div>
<div class="line"> </div>
<div class="line">    <span class="keywordflow">if</span> (unpinned) {</div>
<div class="line">      <span class="keywordflow">throw</span> std::runtime_error(</div>
<div class="line">          <span class="stringliteral">&quot;Unpinning &quot;</span> + object_id +</div>
<div class="line">          <span class="stringliteral">&quot; non-recursively succeeded but should have failed.&quot;</span>);</div>
<div class="line">    }</div>
<div class="line"> </div>
<div class="line">    client.PinRm(object_id, <a class="code hl_enumvalue" href="classipfs_1_1Client.html#adc5716aa4272ff2bedcae954339c77d0a1c1aa83dfe54dfc3528f9e40131cf638">ipfs::Client::PinRmOptions::RECURSIVE</a>);</div>
<div class="ttc" id="aclassipfs_1_1Client_html_adc5716aa4272ff2bedcae954339c77d0a1c1aa83dfe54dfc3528f9e40131cf638"><div class="ttname"><a href="classipfs_1_1Client.html#adc5716aa4272ff2bedcae954339c77d0a1c1aa83dfe54dfc3528f9e40131cf638">ipfs::Client::PinRmOptions::RECURSIVE</a></div><div class="ttdeci">@ RECURSIVE</div><div class="ttdoc">Recursively unpin the objects.</div></div>
<div class="ttc" id="aclassipfs_1_1Client_html_adc5716aa4272ff2bedcae954339c77d0a254f9369d66a06a09f3ac854e72f6825"><div class="ttname"><a href="classipfs_1_1Client.html#adc5716aa4272ff2bedcae954339c77d0a254f9369d66a06a09f3ac854e72f6825">ipfs::Client::PinRmOptions::NON_RECURSIVE</a></div><div class="ttdeci">@ NON_RECURSIVE</div><div class="ttdoc">Just unpin the specified object.</div></div>
</div><!-- fragment --><dl class="exception"><dt>Exceptions</dt><dd>
  <table class="exception">
    <tr><td class="paramname">std::exception</td><td>if any error occurs</td></tr>
  </table>
  </dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><code><a class="el" href="classipfs_1_1Client.html#adc5716aa4272ff2bedcae954339c77d0" title="Options to control the PinRm() method.">PinRmOptions</a></code></dd></dl>
<dl class="section since"><dt>Since</dt><dd>version 0.1.0 </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">object_id</td><td>Id of the object to unpin (multihash).  </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">options</td><td>Unpin options. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a60b2274e7ee70ed9392870cd2c5a8559" name="a60b2274e7ee70ed9392870cd2c5a8559"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a60b2274e7ee70ed9392870cd2c5a8559">&#9670;&#160;</a></span>Reset()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ipfs::Client::Reset </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Resets the abort call, allowing to execute new API requests again. </p>
<p>Used in combintation with the <a class="el" href="classipfs_1_1Client.html#aaa862322e6ec703b91ed356d968fbc49" title="Abort any current running IPFS API request.">Abort()</a> method.</p>
<p>Once you executed the <a class="el" href="classipfs_1_1Client.html#aaa862322e6ec703b91ed356d968fbc49" title="Abort any current running IPFS API request.">Abort()</a> method and thread.join() call. Which wait until the thread is completly finished. You need to call the <a class="el" href="classipfs_1_1Client.html#a60b2274e7ee70ed9392870cd2c5a8559" title="Resets the abort call, allowing to execute new API requests again.">Reset()</a> method in order to reset the internal state. Allow you to execute new API requests again.</p>
<p>Call this method out-side of the running thread, eg. the main thread.</p>
<p>See example: <a href="https://vasild.github.io/cpp-ipfs-http-client/examples.html">https://vasild.github.io/cpp-ipfs-http-client/examples.html</a></p>
<dl class="section since"><dt>Since</dt><dd>version 0.6.0 </dd></dl>
<dl class="section examples"><dt>Examples</dt><dd><a class="el" href="threading_example_8cc-example.html#a3">threading_example.cc</a>.</dd>
</dl>

</div>
</div>
<a id="ad944a5a304c799b314b3b9ab7765d314" name="ad944a5a304c799b314b3b9ab7765d314"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad944a5a304c799b314b3b9ab7765d314">&#9670;&#160;</a></span>StatsBw()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ipfs::Client::StatsBw </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="namespaceipfs.html#a92ea49891c9d47378b920b41704a29ec">Json</a> *&#160;</td>
          <td class="paramname"><em>bandwidth_info</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get IPFS bandwidth (bw) information. </p>
<p>Implements <a href="https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/STATS.md#ipfsstatsbwoptions">https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/STATS.md#ipfsstatsbwoptions</a>.</p>
<p>An example usage: </p><div class="fragment"><div class="line">    <a class="code hl_typedef" href="namespaceipfs.html#a92ea49891c9d47378b920b41704a29ec">ipfs::Json</a> bandwidth_info;</div>
<div class="line"> </div>
<div class="line">    client.StatsBw(&amp;bandwidth_info);</div>
<div class="line"> </div>
<div class="line">    std::cout &lt;&lt; <span class="stringliteral">&quot;Bandwidth:&quot;</span> &lt;&lt; std::endl &lt;&lt; bandwidth_info.dump(2) &lt;&lt; std::endl;</div>
<div class="line">    <span class="comment">/* An example output:</span></div>
<div class="line"><span class="comment">    Bandwidth:</span></div>
<div class="line"><span class="comment">    {</span></div>
<div class="line"><span class="comment">    &quot;RateIn&quot;: 4541.421091935148,</span></div>
<div class="line"><span class="comment">    &quot;RateOut&quot;: 677.3253862633403,</span></div>
<div class="line"><span class="comment">    &quot;TotalIn&quot;: 15994960,</span></div>
<div class="line"><span class="comment">    &quot;TotalOut&quot;: 6696092</span></div>
<div class="line"><span class="comment">    }</span></div>
<div class="line"><span class="comment">    */</span></div>
</div><!-- fragment --><dl class="exception"><dt>Exceptions</dt><dd>
  <table class="exception">
    <tr><td class="paramname">std::exception</td><td>if any error occurs</td></tr>
  </table>
  </dd>
</dl>
<dl class="section since"><dt>Since</dt><dd>version 0.1.0 </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[out]</td><td class="paramname">bandwidth_info</td><td>Structure that contains IPFS bandwidth information. For example: { "RateIn": 4541.421091935148, "RateOut": 677.3253862633403, "TotalIn": 15994960, "TotalOut": 6696092 } </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="aec756626c42caf55728dad5b6cb7d0f3" name="aec756626c42caf55728dad5b6cb7d0f3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aec756626c42caf55728dad5b6cb7d0f3">&#9670;&#160;</a></span>StatsRepo()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ipfs::Client::StatsRepo </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="namespaceipfs.html#a92ea49891c9d47378b920b41704a29ec">Json</a> *&#160;</td>
          <td class="paramname"><em>repo_stats</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get IPFS Repo Stats. </p>
<p>Implements <a href="https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/REPO.md#ipfsrepostatoptions">https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/REPO.md#ipfsrepostatoptions</a>.</p>
<p>An example usage: </p><div class="fragment"><div class="line">    <a class="code hl_typedef" href="namespaceipfs.html#a92ea49891c9d47378b920b41704a29ec">ipfs::Json</a> repo_stats;</div>
<div class="line"> </div>
<div class="line">    client.StatsRepo(&amp;repo_stats);</div>
<div class="line"> </div>
<div class="line">    std::cout &lt;&lt; <span class="stringliteral">&quot;Repo:&quot;</span> &lt;&lt; std::endl &lt;&lt; repo_stats.dump(2) &lt;&lt; std::endl;</div>
<div class="line">    <span class="comment">/* An example output:</span></div>
<div class="line"><span class="comment">    Repo:</span></div>
<div class="line"><span class="comment">    {</span></div>
<div class="line"><span class="comment">      &quot;RepoSize&quot;:256893470,</span></div>
<div class="line"><span class="comment">      &quot;StorageMax&quot;:20000000000,</span></div>
<div class="line"><span class="comment">      &quot;NumObjects&quot;:24935,</span></div>
<div class="line"><span class="comment">      &quot;RepoPath&quot;:&quot;/home/melroy/.ipfs&quot;,</span></div>
<div class="line"><span class="comment">      &quot;Version&quot;:&quot;fs-repo@11&quot;</span></div>
<div class="line"><span class="comment">    }</span></div>
<div class="line"><span class="comment">    */</span></div>
</div><!-- fragment --><dl class="exception"><dt>Exceptions</dt><dd>
  <table class="exception">
    <tr><td class="paramname">std::exception</td><td>if any error occurs</td></tr>
  </table>
  </dd>
</dl>
<dl class="section since"><dt>Since</dt><dd>version 0.5.0 </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[out]</td><td class="paramname">repo_stats</td><td>Structure that contains IPFS repo stats. For example: { "RepoSize":256893470, "StorageMax":20000000000, "NumObjects":24935, "RepoPath":"/home/melroy/.ipfs", "Version":"fs-repo@11" } </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="aa45a95118ec539863c12da953ab1988c" name="aa45a95118ec539863c12da953ab1988c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa45a95118ec539863c12da953ab1988c">&#9670;&#160;</a></span>SwarmAddrs()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ipfs::Client::SwarmAddrs </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="namespaceipfs.html#a92ea49891c9d47378b920b41704a29ec">Json</a> *&#160;</td>
          <td class="paramname"><em>addresses</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>List of known addresses of each peer connected. </p>
<p>Implements <a href="https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/SWARM.md#swarmaddrs">https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/SWARM.md#swarmaddrs</a>.</p>
<p>An example usage: </p><div class="fragment"><div class="line">    <a class="code hl_typedef" href="namespaceipfs.html#a92ea49891c9d47378b920b41704a29ec">ipfs::Json</a> addresses;</div>
<div class="line"> </div>
<div class="line">    client.SwarmAddrs(&amp;addresses);</div>
<div class="line"> </div>
<div class="line">    std::cout &lt;&lt; <span class="stringliteral">&quot;Known addresses of each peer:&quot;</span> &lt;&lt; std::endl</div>
<div class="line">              &lt;&lt; addresses.dump(2).substr(0, 8192) &lt;&lt; std::endl;</div>
<div class="line">    <span class="comment">/* An example output:</span></div>
<div class="line"><span class="comment">    Known addresses of each peer:</span></div>
<div class="line"><span class="comment">    {</span></div>
<div class="line"><span class="comment">      &quot;Addrs&quot;: {</span></div>
<div class="line"><span class="comment">        &quot;QmNRV7kyUxYaQ4KQxFXPYm8EfuzJbtGn1wSFenjXL6LD8y&quot;: [</span></div>
<div class="line"><span class="comment">          &quot;/ip4/127.0.0.1/tcp/4001&quot;,</span></div>
<div class="line"><span class="comment">          &quot;/ip4/172.17.0.2/tcp/4001&quot;,</span></div>
<div class="line"><span class="comment">          &quot;/ip4/5.9.33.222/tcp/1040&quot;,</span></div>
<div class="line"><span class="comment">          &quot;/ip4/5.9.33.222/tcp/4001&quot;,</span></div>
<div class="line"><span class="comment">          &quot;/ip6/::1/tcp/4001&quot;</span></div>
<div class="line"><span class="comment">        ],</span></div>
<div class="line"><span class="comment">        &quot;QmNYXVn17mHCA1cdTh2DF5KmD9RJ72QkJQ6Eo7HyAuMYqG&quot;: [</span></div>
<div class="line"><span class="comment">          &quot;/ip4/10.12.0.5/tcp/4001&quot;,</span></div>
<div class="line"><span class="comment">          &quot;/ip4/104.131.144.16/tcp/4001&quot;,</span></div>
<div class="line"><span class="comment">          &quot;/ip4/127.0.0.1/tcp/4001&quot;,</span></div>
<div class="line"><span class="comment">          &quot;/ip6/::1/tcp/4001&quot;</span></div>
<div class="line"><span class="comment">        ],</span></div>
<div class="line"><span class="comment">        ...</span></div>
<div class="line"><span class="comment">      }</span></div>
<div class="line"><span class="comment">    }</span></div>
<div class="line"><span class="comment">    */</span></div>
</div><!-- fragment --><dl class="exception"><dt>Exceptions</dt><dd>
  <table class="exception">
    <tr><td class="paramname">std::exception</td><td>if any error occurs</td></tr>
  </table>
  </dd>
</dl>
<dl class="section since"><dt>Since</dt><dd>version 0.1.0 </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[out]</td><td class="paramname">addresses</td><td>The retrieved list. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a2dc1372e2c7505e541115c97c7b497a7" name="a2dc1372e2c7505e541115c97c7b497a7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2dc1372e2c7505e541115c97c7b497a7">&#9670;&#160;</a></span>SwarmConnect()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ipfs::Client::SwarmConnect </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>peer</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Open a connection to a given address. </p>
<p>Implements <a href="https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/SWARM.md#swarmconnect">https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/SWARM.md#swarmconnect</a>.</p>
<p>An example usage: </p><div class="fragment"><div class="line">      <span class="comment">/* std::string peer =</span></div>
<div class="line"><span class="comment">       * &quot;/ip4/104.131.131.81/tcp/4001/ipfs/QmaCpDMGvV2BGHeYERUEnRQAwe3N8SzbUtfsmvsqQLuvuJ&quot;</span></div>
<div class="line"><span class="comment">       * for example */</span></div>
<div class="line">      client.SwarmConnect(peer);</div>
</div><!-- fragment --><dl class="exception"><dt>Exceptions</dt><dd>
  <table class="exception">
    <tr><td class="paramname">std::exception</td><td>if any error occurs</td></tr>
  </table>
  </dd>
</dl>
<dl class="section since"><dt>Since</dt><dd>version 0.1.0 </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">peer</td><td>Peer to connect to. For example: <code>"/ip4/104.131.131.82/tcp/4001/ipfs/QmaCpDMGvV2BGHeYERUEnRQAwe3N8SzbUtfsmvsqQLuvuJ"</code> </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="afd550da40c4517c59750327784707923" name="afd550da40c4517c59750327784707923"></a>
<h2 class="memtitle"><span class="permalink"><a href="#afd550da40c4517c59750327784707923">&#9670;&#160;</a></span>SwarmDisconnect()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ipfs::Client::SwarmDisconnect </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>peer</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Close a connection on a given address. </p>
<p>Implements <a href="https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/SWARM.md#swarmdisconnect">https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/SWARM.md#swarmdisconnect</a>.</p>
<p>An example usage: </p><div class="fragment"><div class="line">      <span class="comment">/* std::string peer =</span></div>
<div class="line"><span class="comment">       * &quot;/ip4/104.131.131.81/tcp/4001/ipfs/QmaCpDMGvV2BGHeYERUEnRQAwe3N8SzbUtfsmvsqQLuvuJ&quot;</span></div>
<div class="line"><span class="comment">       * for example */</span></div>
<div class="line">      client.SwarmDisconnect(peer);</div>
</div><!-- fragment --><dl class="exception"><dt>Exceptions</dt><dd>
  <table class="exception">
    <tr><td class="paramname">std::exception</td><td>if any error occurs</td></tr>
  </table>
  </dd>
</dl>
<dl class="section since"><dt>Since</dt><dd>version 0.1.0 </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">peer</td><td>Peer to disconnect from to. For example: <code>"/ip4/104.131.131.82/tcp/4001/ipfs/QmaCpDMGvV2BGHeYERUEnRQAwe3N8SzbUtfsmvsqQLuvuJ"</code> </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a3c1f5392892d51152e45221ce1a026da" name="a3c1f5392892d51152e45221ce1a026da"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3c1f5392892d51152e45221ce1a026da">&#9670;&#160;</a></span>SwarmPeers()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ipfs::Client::SwarmPeers </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="namespaceipfs.html#a92ea49891c9d47378b920b41704a29ec">Json</a> *&#160;</td>
          <td class="paramname"><em>peers</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>List the peers that we have connections with. </p>
<p>Implements <a href="https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/SWARM.md#swarmpeers">https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/SWARM.md#swarmpeers</a>.</p>
<p>An example usage: </p><div class="fragment"><div class="line">    <a class="code hl_typedef" href="namespaceipfs.html#a92ea49891c9d47378b920b41704a29ec">ipfs::Json</a> peers;</div>
<div class="line"> </div>
<div class="line">    client.SwarmPeers(&amp;peers);</div>
<div class="line"> </div>
<div class="line">    std::cout &lt;&lt; <span class="stringliteral">&quot;Peers:&quot;</span> &lt;&lt; std::endl &lt;&lt; peers.dump(2) &lt;&lt; std::endl;</div>
<div class="line">    <span class="comment">/* An example output:</span></div>
<div class="line"><span class="comment">    Peers:</span></div>
<div class="line"><span class="comment">    {</span></div>
<div class="line"><span class="comment">      &quot;Strings&quot;: [</span></div>
<div class="line"><span class="comment">        &quot;/ip4/104.131.131.82/tcp/4001/ipfs/QmaCpDMGvV2BGHeYERUEnRQAwe3N8SzbUtfsmvsqQLuvuJ&quot;,</span></div>
<div class="line"><span class="comment">        &quot;/ip4/104.131.144.16/tcp/4001/ipfs/QmNYXVn17mHCA1cdTh2DF5KmD9RJ72QkJQ6Eo7HyAuMYqG&quot;,</span></div>
<div class="line"><span class="comment">        &quot;/ip4/104.223.59.174/tcp/4001/ipfs/QmeWdgoZezpdHz1PX8Ly8AeDQahFkBNtHn6qKeNtWP1jB6&quot;,</span></div>
<div class="line"><span class="comment">        ...</span></div>
<div class="line"><span class="comment">      ]</span></div>
<div class="line"><span class="comment">    }</span></div>
<div class="line"><span class="comment">    */</span></div>
</div><!-- fragment --><dl class="exception"><dt>Exceptions</dt><dd>
  <table class="exception">
    <tr><td class="paramname">std::exception</td><td>if any error occurs</td></tr>
  </table>
  </dd>
</dl>
<dl class="section since"><dt>Since</dt><dd>version 0.1.0 </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[out]</td><td class="paramname">peers</td><td>The retrieved list. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="adaabe1a027399cbcabe291f3471e87f4" name="adaabe1a027399cbcabe291f3471e87f4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#adaabe1a027399cbcabe291f3471e87f4">&#9670;&#160;</a></span>Version()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ipfs::Client::Version </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="namespaceipfs.html#a92ea49891c9d47378b920b41704a29ec">Json</a> *&#160;</td>
          <td class="paramname"><em>version</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Return the implementation version of the peer. </p>
<p>Implements <a href="https://github.com/ipfs/js-ipfs/tree/master/docs/core-api/MISCELLANEOUS.md#version">https://github.com/ipfs/js-ipfs/tree/master/docs/core-api/MISCELLANEOUS.md#version</a>.</p>
<p>An example usage: </p><div class="fragment"><div class="line">    <a class="code hl_typedef" href="namespaceipfs.html#a92ea49891c9d47378b920b41704a29ec">ipfs::Json</a> version;</div>
<div class="line">    client.Version(&amp;version);</div>
<div class="line">    std::cout &lt;&lt; <span class="stringliteral">&quot;Peer&#39;s version: &quot;</span> &lt;&lt; version &lt;&lt; std::endl;</div>
<div class="line">    <span class="comment">/* An example output:</span></div>
<div class="line"><span class="comment">    Peer&#39;s version: {&quot;Commit&quot;:&quot;ee6dd5e&quot;,&quot;Golang&quot;:&quot;go1.7.3&quot;,&quot;Repo&quot;:&quot;4&quot;,</span></div>
<div class="line"><span class="comment">    &quot;System&quot;:&quot;amd64/freebsd&quot;,&quot;Version&quot;:&quot;0.4.3&quot;}</span></div>
<div class="line"><span class="comment">    */</span></div>
</div><!-- fragment --><dl class="exception"><dt>Exceptions</dt><dd>
  <table class="exception">
    <tr><td class="paramname">std::exception</td><td>if any error occurs</td></tr>
  </table>
  </dd>
</dl>
<dl class="section since"><dt>Since</dt><dd>version 0.1.0 </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[out]</td><td class="paramname">version</td><td>The peer's implementation version. It contains at least the properties "Repo", "System", "Version". </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>/media/melroy/Data/Projects/cpp-ipfs-http-client/include/ipfs/<a class="el" href="client_8h_source.html">client.h</a></li>
<li>/media/melroy/Data/Projects/cpp-ipfs-http-client/src/client.cc</li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.7
</small></address>
</body>
</html>
